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 –