修正月份范围选择类型比较开始和结束日期错误问题

pull/86/head
hho2002 2023-03-31 22:00:53 +08:00
parent f3ccfc871f
commit 1698d4e84a
1 changed files with 5 additions and 0 deletions

View File

@ -2297,6 +2297,11 @@
if(options.range && options.type !== 'time'){ if(options.range && options.type !== 'time'){
start = start || options.dateTime; start = start || options.dateTime;
end = end || that.endDate; end = end || that.endDate;
//月份范围选择默认日期为1号处理
if(options.type == 'month'){
start.date = 1;
end.date = 1;
}
isOut = that.newDate(start).getTime() > that.newDate(end).getTime(); isOut = that.newDate(start).getTime() > that.newDate(end).getTime();
//如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期 //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期