开发者

JQuery UI Datepicker Current Day

开发者 https://www.devze.com 2022-12-16 19:22 出处:网络
My page uses a JQuery UI Datepicker and loads with the current day selected and weekends and selected dates restricted.

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

精彩评论

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