From a92c6dab954d85c4789ec51ec1465d68125b83d6 Mon Sep 17 00:00:00 2001 From: yangyanbin <1536827451@qq.com> Date: Wed, 13 Sep 2017 16:55:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=89=E6=8B=A9=E5=B9=B4?= =?UTF-8?q?=E6=9C=88=E6=8E=A7=E4=BB=B6=E6=97=B6=E9=80=89=E6=8B=A9=E6=9C=88?= =?UTF-8?q?=E4=BB=BD=E5=90=8E=E5=85=B3=E9=97=AD=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当选择type:"month",showBottom:false时,选择月份后直接选取月份后,关闭日期控件 --- src/laydate.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/laydate.js b/src/laydate.js index ca30988..dc386c7 100644 --- a/src/laydate.js +++ b/src/laydate.js @@ -1250,7 +1250,11 @@ that.checkDate('limit').calendar(); that.closeList(); } - + if(!options.range&&!options.showBottom&&options.type==="month"&&type==="month"){ + that.done(); + that.setValue(that.parse()).remove(); + return; + } that.setBtnStatus(); //同步按钮可点状态 options.range || that.done(null, 'change'); lay(that.footer).find(ELEM_TIME_BTN).removeClass(DISABLED); @@ -1853,4 +1857,4 @@ }() ); -}(); \ No newline at end of file +}();