From f1e3174b4514cba0b545ff65d02cd94f7d41c7aa Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Thu, 9 Jun 2022 10:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/dynamicdatetime/dynamicdatetime.combo.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index bed4bc0f1..d533205fe 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -32,7 +32,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { var date = BI.getDate(); this.storeValue = opts.value; var border = opts.simple ? 1 : 2; - var errorState = false; return { type: "bi.absolute", @@ -121,7 +120,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { } }; self.combo.element.addClass("error"); - errorState = true; self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR); } }, { @@ -141,11 +139,10 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { action: function () { var dateStore = self.storeTriggerValue; var dateObj = self.trigger.getKey(); - if (self.combo.isViewVisible() || BI.isEqual(dateObj, dateStore) && !errorState) { + if (self.combo.isViewVisible() || BI.isEqual(dateObj, dateStore)) { return; } - if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore) - || BI.isEqual(dateObj, dateStore) && errorState) { + if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { self.storeValue = self.trigger.getValue(); self.setValue(self.trigger.getValue()); } else if (BI.isEmptyString(dateObj)) { @@ -154,7 +151,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { } self._checkDynamicValue(self.storeValue); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM); - errorState = false; } }] }]