在jQuery UI Datepicker中禁用未来日期 [英] Disable future dates in jQuery UI Datepicker
本文介绍了在jQuery UI Datepicker中禁用未来日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从今天起禁用未来的日期?
让我们说今天是2010年10月23日,所以24/10/2010开始被禁用。 p>
对不起,我在jQuery和JavaScript中是非常新的。
解决方案
确实。 datepicker具有您在初始化时可以设置的maxdate属性。
这是codez
$(#datepicker)。datepicker({maxDate:new Date,minDate:new Date(2007,6,12)});
Is it possible to disable future date from today?
Let say today is 23/10/2010, so 24/10/2010 onwards are disabled.
Sorry I am very new in jQuery and JavaScript.
解决方案
Yes, indeed. The datepicker has the maxdate property that you can set when you initialize it.
Here's the codez
$("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) });
这篇关于在jQuery UI Datepicker中禁用未来日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文