From deda1e402bca1ed1c0a3fabaaf251e901dfffb9d Mon Sep 17 00:00:00 2001 From: yangyanbin <1536827451@qq.com> Date: Wed, 13 Sep 2017 10:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=97=A5=E6=9C=9F=E5=90=8E?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/laydate.js b/src/laydate.js index b9d3d6b..54e7dd1 100644 --- a/src/laydate.js +++ b/src/laydate.js @@ -1250,6 +1250,10 @@ that.setBtnStatus(); //同步按钮可点状态 options.range || that.done(null, 'change'); lay(that.footer).find(ELEM_TIME_BTN).removeClass(DISABLED); + if(!options.range&&options.type==="month"&&!options.showBottom&&lay(this.parentNode).hasClass("laydate-month-list")){ + that.done(); + that.setValue(that.parse()).remove(); + } }); } else { var span = lay.elem('span', { @@ -1852,4 +1856,4 @@ }() ); -}(); \ No newline at end of file +}();