From 5948916285acdb31b65b7e0e5adf160fb72f6d46 Mon Sep 17 00:00:00 2001 From: sight <26325820+Sight-wcg@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:58:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(laydate):=20=E4=BF=AE=E5=A4=8D=20`range:fal?= =?UTF-8?q?se,=20autoConfirm:false`=20=E6=97=B6=E7=A1=AE=E8=AE=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=8A=B6=E6=80=81=E5=90=8C=E6=AD=A5=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/laydate.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modules/laydate.js b/src/modules/laydate.js index ae5734b1..a0ae75c0 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -1805,6 +1805,15 @@ that.closeList(); } + if(!options.range){ + that.limit({ + type: type, + elem: lay(that.footer).find(ELEM_CONFIRM), + date: dateTime, + disabledType: 'datetime' // 按钮,检测日期和时间 + }); + } + that.setBtnStatus(); //同步按钮可点状态 //若为月选择器,只有当选择月份时才自动关闭; @@ -2421,7 +2430,8 @@ options.range || that.limit({ elem: lay(that.footer).find(ELEM_CONFIRM), date: { - year: listYM[0] + year: listYM[0], + month: isYear ? 0 : listYM[1] - 1, }, disabledType: 'datetime' // 按钮,检测日期和时间 });