use layui"s layDate control,
is used in a pop-up window,
pop-up window and the current page are the same page,
click to close the pop-up window to let the previously selected value of layDate empty out
is equivalent to refreshing this control once
what should the gods do?
range used to constrain selection time
var start = laydate.render ({
elem: "-sharptest-out-start",
format: "yyyy-MM-dd",
isInitValue: false,
done: function(value, date, endDate) {
if(value !==""){
end.config.min = {
year: date.year,
month: date.month - 1,
date: date.date
}
}else {
end.config.min = {
year: 1900,
month: 0, //
date: 1
}
}
}
});
var end = laydate.render({
elem: "-sharptest-out-end",
format: "yyyy-MM-dd",
isInitValue: false,
done: function(value, date, endDate) {
if(value != ""){
start.config.max = {
year: date.year,
month: date.month - 1,
date: date.date
}
}else {
start.config.max = {
year: 1900,
month: 0, //
date: 1
}
}
}
});
})