0
可以在onSelect委托内重置maxdate属性吗?jquery-ui datepicker maxdate - 可以在onSelect中重置它吗?
这将是完美的,如果我可以这样做:
$(".date-picker").datepicker({
maxDate: someDate,
onSelect: function (date) {
if(somecondition is true) {
maxDate = someotherDate;
}
//some other functionality goes here,
}
});
如何重新设置onSelect中的maxDate?只需通过做maxDate = newMaxDate.toString() – sarsnake
什么是选项?请记住,我需要onSelect(我正在做其他的东西)。 – sarsnake
这只是一种允许您更改后期初始化选项的方法。 http://jqueryui.com/demos/datepicker –