标签:
$("#calendar_add").calendar({
validator:function(date){
var now = new Date();
var today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
var selectday=date.getTime()-today.getTime();
if(selectday<0){//判断date和当前时间new Date()的先后,如果date晚于当前时间,return false;
return false;//如果date晚于当前时间
}
return true
},
onSelect: function(date){
alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate());
}
});
是datebox继承自Calendar,是datebox创建时会包含一个calendar。
所以可以从datebox获取一个他使用的calendar
$(‘#dd‘).datebox(‘calendar‘).calendar({
标签: