给laydate添加触发的事件,闪退就是因为鼠标的mouse事件
html:
<input type="text" class="layui-input test-item" placeholder="审核时间" value="${model.checkDate}" name="checkDate">
js:
var endDate=laydate.render({
elem: '.laydate3',
type: 'date',
trigger: 'click', //这个是重点,谷歌浏览器现在闪退就是因为鼠标的mouse事件 改成click就能解决
range: false,
done: function(value,date){
if(date.year){
startDate.config.max={
year:date.year,
month:date.month-1,
date: date.date,
hours: 0,
minutes: 0,
seconds : 0
}
}else{
startDate.config.max={
year:2800,
month:date.month-1,
date: date.date,
hours: 0,
minutes: 0,
seconds : 0
}
}
}
});
网友评论