From f14351dc5aad4d409681f607fc96ddf855bc96cb Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 21 Apr 2021 10:19:44 +0800 Subject: [PATCH] =?UTF-8?q?BI-80720=20&&=20BI-84644=20fix:=20=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E8=8C=83=E5=9B=B4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/dynamicdate/dynamicdate.card.js | 15 ++++----------- src/widget/dynamicdate/dynamicdate.param.item.js | 3 --- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/widget/dynamicdate/dynamicdate.card.js b/src/widget/dynamicdate/dynamicdate.card.js index acc9b6afe..00d3c12b8 100644 --- a/src/widget/dynamicdate/dynamicdate.card.js +++ b/src/widget/dynamicdate/dynamicdate.card.js @@ -173,7 +173,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { listeners: [{ eventName: "EVENT_CHANGE", action: function () { - this.setValue(self._checkPositionValue(this.getValue()[0])); + self.position = this.getValue()[0]; + this.setValue(self.position); self.fireEvent("EVENT_CHANGE"); } }] @@ -189,7 +190,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { listeners: [{ eventName: "EVENT_CHANGE", action: function () { - this.setValue(self._checkPositionValue(this.getValue()[0])); + self.position = this.getValue()[0]; + this.setValue(self.position); self.fireEvent("EVENT_CHANGE"); } }] @@ -201,15 +203,6 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { return items; }, - _checkPositionValue: function (v) { - var lastPosition = this.position; - this.position = v; - if (!this._checkDate({})) { - this.position = lastPosition; - } - return this.position; - }, - _checkDate: function (obj) { var o = this.options; var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj))); diff --git a/src/widget/dynamicdate/dynamicdate.param.item.js b/src/widget/dynamicdate/dynamicdate.param.item.js index 9cb96a26d..1db32d44c 100644 --- a/src/widget/dynamicdate/dynamicdate.param.item.js +++ b/src/widget/dynamicdate/dynamicdate.param.item.js @@ -69,9 +69,6 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, { listeners: [{ eventName: BI.TextValueCombo.EVENT_CHANGE, action: function () { - if (!o.validationChecker(self.getValue())) { - self.editor.setValue(0); - } self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE); } }]