Browse Source

BI-80720 && BI-84644 fix: 控件范围提示

es6
windy 4 years ago
parent
commit
f14351dc5a
  1. 15
      src/widget/dynamicdate/dynamicdate.card.js
  2. 3
      src/widget/dynamicdate/dynamicdate.param.item.js

15
src/widget/dynamicdate/dynamicdate.card.js

@ -173,7 +173,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
action: function () { action: function () {
this.setValue(self._checkPositionValue(this.getValue()[0])); self.position = this.getValue()[0];
this.setValue(self.position);
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
@ -189,7 +190,8 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
action: function () { action: function () {
this.setValue(self._checkPositionValue(this.getValue()[0])); self.position = this.getValue()[0];
this.setValue(self.position);
self.fireEvent("EVENT_CHANGE"); self.fireEvent("EVENT_CHANGE");
} }
}] }]
@ -201,15 +203,6 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
return items; return items;
}, },
_checkPositionValue: function (v) {
var lastPosition = this.position;
this.position = v;
if (!this._checkDate({})) {
this.position = lastPosition;
}
return this.position;
},
_checkDate: function (obj) { _checkDate: function (obj) {
var o = this.options; var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj))); var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));

3
src/widget/dynamicdate/dynamicdate.param.item.js

@ -69,9 +69,6 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
action: function () { action: function () {
if (!o.validationChecker(self.getValue())) {
self.editor.setValue(0);
}
self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE); self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);
} }
}] }]

Loading…
Cancel
Save