From ab6cf1eb634f93782ca69da74f7e8576f30be7df Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 8 May 2018 10:17:36 +0800 Subject: [PATCH] update --- dist/bundle.js | 7 ++++--- dist/fineui.js | 7 ++++--- dist/widget.js | 7 ++++--- src/widget/datepane/card.static.datepane.js | 1 + src/widget/datetimepane/card.static.datetimepane.js | 2 +- src/widget/yearmonth/trigger.yearmonth.js | 2 +- src/widget/yearquarter/trigger.yearquarter.js | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 4e196e7d0..251db6552 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -88599,6 +88599,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, { }; self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -89322,7 +89323,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar }); self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); - self.fireEvent("EVENT_CHANGE"); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -109478,7 +109479,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); @@ -110418,7 +110419,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotNull(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.quarterEditor.focus(); diff --git a/dist/fineui.js b/dist/fineui.js index de6cf4743..68e661415 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -88842,6 +88842,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, { }; self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -89565,7 +89566,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar }); self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); - self.fireEvent("EVENT_CHANGE"); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -109721,7 +109722,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); @@ -110661,7 +110662,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotNull(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.quarterEditor.focus(); diff --git a/dist/widget.js b/dist/widget.js index 03c7b7c1a..7d5a30c26 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -1132,6 +1132,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, { }; self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -1855,7 +1856,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar }); self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); - self.fireEvent("EVENT_CHANGE"); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ @@ -22011,7 +22012,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); @@ -22951,7 +22952,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotNull(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.quarterEditor.focus(); diff --git a/src/widget/datepane/card.static.datepane.js b/src/widget/datepane/card.static.datepane.js index 181e73c35..1d31abce1 100644 --- a/src/widget/datepane/card.static.datepane.js +++ b/src/widget/datepane/card.static.datepane.js @@ -43,6 +43,7 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, { }; self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ diff --git a/src/widget/datetimepane/card.static.datetimepane.js b/src/widget/datetimepane/card.static.datetimepane.js index 913b9fcc0..6c8bd92ee 100644 --- a/src/widget/datetimepane/card.static.datetimepane.js +++ b/src/widget/datetimepane/card.static.datetimepane.js @@ -40,7 +40,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, { }); self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime)); self.calendar.setValue(self.selectedTime); - self.fireEvent("EVENT_CHANGE"); + day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE); }); this.calendar = BI.createWidget({ diff --git a/src/widget/yearmonth/trigger.yearmonth.js b/src/widget/yearmonth/trigger.yearmonth.js index 6173a7faa..e44cf44f0 100644 --- a/src/widget/yearmonth/trigger.yearmonth.js +++ b/src/widget/yearmonth/trigger.yearmonth.js @@ -167,7 +167,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, { _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); diff --git a/src/widget/yearquarter/trigger.yearquarter.js b/src/widget/yearquarter/trigger.yearquarter.js index 0ddd19a33..ef1b47251 100644 --- a/src/widget/yearquarter/trigger.yearquarter.js +++ b/src/widget/yearquarter/trigger.yearquarter.js @@ -133,7 +133,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, { _autoSwitch: function (editor) { var v = editor.getValue(); - if (BI.checkDateLegal(v)) { + if (BI.isNotNull(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); this.quarterEditor.focus();