【发布时间】:2016-11-30 20:38:59
【问题描述】:
我使用下面的 jquery 来显示日期选择器我有多个日期选择框。它工作正常。但是它没有显示 12 月。请帮帮我这是我的代码
$('.datepicker').live('focus',function(){
$(this).datepicker({
dateFormat: 'dd-mm-yy',
changeMonth: true,
changeYear: true,
yearRange: '1900:' + new Date().getFullYear(),
maxDate: 0
})
});
【问题讨论】:
-
为什么要设置
maxDate: 0? -
@AnthonyC 添加了 maxDate = 0 以便它不显示未来日期。
-
请在jsfiddle.net分享你的js
标签: datepicker jquery-ui-datepicker bootstrap-datepicker