From 3518b158629cc7ed4b3307f6461ded1d9d6fbf02 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 23 Mar 2021 16:44:49 +0800 Subject: [PATCH] =?UTF-8?q?BI-83716=20fix:=20=E5=8A=A8=E6=80=81=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=9D=A2=E6=9D=BF=E7=9A=84=E6=97=B6=E9=97=B4=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E4=B8=8D=E5=8F=97=E8=8C=83=E5=9B=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/dynamicdate/dynamicdate.card.js | 4 ++++ src/widget/dynamicdate/dynamicdate.popup.js | 2 +- src/widget/dynamicdatetime/dynamicdatetime.popup.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widget/dynamicdate/dynamicdate.card.js b/src/widget/dynamicdate/dynamicdate.card.js index 41598d7aa0..acc9b6afe6 100644 --- a/src/widget/dynamicdate/dynamicdate.card.js +++ b/src/widget/dynamicdate/dynamicdate.card.js @@ -389,6 +389,10 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { return this.checkValidation() ? this._getValue() : {}; }, + getInputValue: function () { + return this._getValue(); + }, + checkValidation: function (show) { var buttons = this.resultPane.getAllButtons(); var errorText; diff --git a/src/widget/dynamicdate/dynamicdate.popup.js b/src/widget/dynamicdate/dynamicdate.popup.js index 3ec959b0ed..0c4052e0cf 100644 --- a/src/widget/dynamicdate/dynamicdate.popup.js +++ b/src/widget/dynamicdate/dynamicdate.popup.js @@ -178,7 +178,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { this.todayButton.setValue(BI.i18nText("BI-Multi_Date_Today")); this.todayButton.setEnable(!this._checkTodayValid()); } else { - var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()); + var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getInputValue()); date = BI.print(date, "%Y-%X-%d"); this.todayButton.setValue(date); this.todayButton.setEnable(false); diff --git a/src/widget/dynamicdatetime/dynamicdatetime.popup.js b/src/widget/dynamicdatetime/dynamicdatetime.popup.js index f38528f367..701320eb33 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.popup.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.popup.js @@ -181,7 +181,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { this.todayButton.setValue(BI.i18nText("BI-Multi_Date_Today")); this.todayButton.setEnable(!this._checkTodayValid()); } else { - var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue()); + var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getInputValue()); date = BI.print(date, "%Y-%X-%d"); this.todayButton.setValue(date); this.todayButton.setEnable(false);