easyUI日期框,默认显示今天,今天以后的日期不能选
时间:2020-01-03 17:51:02
收藏:0
阅读:391
<input class="easyui-datebox" id="chartDate"/>
js:
var curr_time = new Date(); //今天以后的日期不能选 $(‘#chartDate‘).datebox().datebox(‘calendar‘).calendar({ validator: function(date){ var d1 = new Date(curr_time.getFullYear(), curr_time.getMonth(), curr_time.getDate()); return d1>=date; } }); //日期默认为今天 $("#chartDate").datebox("setValue",curr_time.Format("yyyy-MM-dd"));
原文:https://www.cnblogs.com/hzhjxx/p/12145607.html
评论(0)