开发者

JQuery UI Datepicker Current Day

My page uses a JQuery UI Datepicker and loads with the current day selected and weekends and selected dates restricted.

I would like the current selected day to become unavailable at 2pm and the day move forward.

Can anyo开发者_StackOverflowne help.


I would just use a variable for the the minDate

var dt = new Date();
if (dt.getHours() > 14) {
    dt = dt.setDate(dt + 1); // go one day in the future
}
$(selector).datepicker({minDate: dt});

You'd just need to use the real javascript Date class methods - which I haven't used in a little while.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜