【发布时间】:2011-08-22 15:04:57
【问题描述】:
我正在尝试使用 jQuery 在我的 html 页面中设置 uidatepicker 的最大日期。我尝试了以下方法:
$(function() {
var theDate = new Date();
$( "#datepicker" ).datepicker(
{
dateFormat: 'dd/mm/yy',
maxDate: new Date(theDate.getYear(), theDate.getMonth(), theDate.getDate());
}
);
这不起作用....我做错了什么?我想让日期选择器的最大日期为今天的日期...
【问题讨论】:
-
你试过
maxDate而不是minDate吗?
标签: javascript jquery date uidatepicker