From 1698d4e84a80225b1dcd253a9794824f182b0cd7 Mon Sep 17 00:00:00 2001 From: hho2002 Date: Fri, 31 Mar 2023 22:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9C=88=E4=BB=BD=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E9=80=89=E6=8B=A9=E7=B1=BB=E5=9E=8B=E6=AF=94=E8=BE=83?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/laydate.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/laydate.js b/src/laydate.js index 0c04177..bd3bd77 100644 --- a/src/laydate.js +++ b/src/laydate.js @@ -2297,6 +2297,11 @@ if(options.range && options.type !== 'time'){ start = start || options.dateTime; end = end || that.endDate; + //月份范围选择:默认日期为1号处理 + if(options.type == 'month'){ + start.date = 1; + end.date = 1; + } isOut = that.newDate(start).getTime() > that.newDate(end).getTime(); //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期