开发者

jQuery Datepicker - Settings help

I am using the jQuery Datepicker plugin and I'm having trouble righting out this unique rule.

I need a rule开发者_如何学C that validates if after 12:00pm disable today

This should be validated on the current AEST time.

Would it be easier to add jquery validate and use that for the validation instead?


// get today's date
var myDate = new Date();
// add one day
myDate.setDate(myDate.getDate()+1);

// bind datepicker to element while using the minDate option
$('.selector').datepicker({
    minDate: myDate
});

This will set the date picker range to any day after today's date. You should still validate client and server side however.

If this is what you are looking for, please select the check mark next to this answer. Thanks!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜