如何在wijmo日历中设置今天的最大日期?
这是我的代码:
$(function () {
$("#calendar1").wijcalendar({
popupMode: true,
selectedDatesChanged: function () {
var selDate = $(this).wijcalendar("getSelectedDate");
var _selDate = dateFormat(selDate, "mm/dd/yyyy");
if (!!selDate) $("#begindate").val(_selDate);
}
});
$("#begindate").click(function () {
$("#calendar1").wijcalendar("popup", {
of: $("#begindate"),
offset: '0 2'
});
})
答案 0 :(得分:0)
有一个maxDate属性:
$(".selector").wijcalendar({
maxDate: new Date(2010,8,15)
});
答案 1 :(得分:0)
得到了答案:
$(function () {
$("#calendar1").wijcalendar({
popupMode: true,
maxDate: new Date(),
selectedDatesChanged: function () {
var selDate = $(this).wijcalendar("getSelectedDate");
var _selDate = dateFormat(selDate, "mm/dd/yyyy");
if (!!selDate) $("#begindate").val(_selDate);
}
});
$("#begindate").click(function () {
$("#calendar1").wijcalendar("popup", {
of: $("#begindate"),
maxDate: new Date(),
offset: '0 2'
});
})
});