var startDate = laydate.render({ elem: '#_select_start_date', //结束日期框的ID type: 'date', done: function (value, date) { if(value!==""){ endDate.config.min = { year:date.year, month:date.month-1, date: date.date } }else { endDate.config.min = { year:"1098", month:"1", date: "1" } } }, trigger: 'click' }); var endDate = laydate.render({ elem:'#_select_end_date', //结束日期框的ID type:'date', done:function(value,date){ if(value!==""){ startDate.config.max={ year:date.year, month:date.month-1, date: date.date }; }else { startDate.config.max={ year:"3019", month:"1", date: "1" }; } }, trigger: 'click' });