From 615a171ac1219fcef2107f8058f6260fa4eb9979 Mon Sep 17 00:00:00 2001 From: hlcsmile <37585626+hlcsmile@users.noreply.github.com> Date: Thu, 9 Aug 2018 17:14:23 +0800 Subject: [PATCH] =?UTF-8?q?datetime=20=E9=BB=98=E8=AE=A4=E5=80=BC=20=20?= =?UTF-8?q?=E9=87=8D=E9=80=89=20=E4=B8=8D=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit type为datetime时 ranget属性为true时 默认初始化 value 属性为 ‘2016-08-11 00:00:00 - 2018-12-02 00:00:00’ 此时点击控件时已经选定该范围的日期,如果重选 默认的不会清楚,会出现三个小绿方块,数据绑定时会出现问题,添加代码 大概为553行 --- src/laydate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/laydate.js b/src/laydate.js index 0a75401..584bc15 100644 --- a/src/laydate.js +++ b/src/laydate.js @@ -553,6 +553,10 @@ that.setValue(that.parse(0, that.systemDate(options.value))); } else { that.setValue(options.value); + // friend:@rainbow 添加的代码 + that.startState = true; + that.endState = true; + // friend:@rainbow 添加的代码 } } }; @@ -1863,4 +1867,4 @@ }() ); -}(); \ No newline at end of file +}();