我的日期选择器有问题。我写了这段代码:
var d = new Date(2013, 5, 5);
$.ig.loader({
scriptPath: "http://cdn-na.infragistics.com/jquery/20131/latest/js/",
cssPath: "http://cdn-na.infragistics.com/jquery/20131/latest/css/",
resources: 'igEditors',
ready: function () {
$('#leftDatePicker').igDatePicker({
width: 230,
beforeShowDay: available,
datepickerOptions: {
minDate: d,
yearRange:"2011:2014",
changeMonth: true,
changeYear: true
}
});
var unAvailableDates = ["17-8-2013", "14-8-2013", "15-7-2013"];
function available(date) {
var dmy = date.getDate() + "-" + (date.getMonth() + 1) + "-" + date.getFullYear();
if ($.inArray(dmy, unAvailableDates) != -1) {
return [false, "", "unAvailable"];
} else {
return [true, "", "Available"];
}
}
}
});
};
(我正在使用 html 和 jquery 处理 Durandal 项目。它是 Infragistics 的日期选择器,但此属性是 jquery 的。)但它启用了所有日期......我能做什么?