layui.use('laydate',function() {
var laydate = layui.laydate;
var startDate = laydate.render({
elem: '#beginTime',
max: $('#endTime').val(),
theme: 'molv',
type: 'datetime',
trigger: 'click',
done: function (value, date) {
endDate.config.min = {
year: date.year,
month: date.month - 1,
date: date.date,
hours: date.hours,
minutes: date.minutes,
seconds: date.seconds
};
endDate.config.value = value;
}
});
var endDate = laydate.render({
elem: '#endTime',
min: $('#beginTime').val(),
theme: 'molv',
type: 'datetime',
trigger: 'click',
done: function (value, date) {
startDate.config.max = {
year: date.year,
month: date.month - 1,
date: date.date,
hours: date.hours,
minutes: date.minutes,
seconds: date.seconds
};
startDate.config.value = value;
}
});
转载请注明原文地址:https://ipadbbs.8miu.com/read-15223.html