Browse Source

Merge branch 'release/11.0' of ssh://code.fineres.com:7999/~austin.duan/new-decision-fineui into release/11.0

research/test
Austin.Duan 2 years ago
parent
commit
3258371d12
  1. 8
      src/widget/dynamicdatetime/dynamicdatetime.combo.js

8
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -32,6 +32,7 @@ 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",
@ -120,6 +121,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}
};
self.combo.element.addClass("error");
errorState = true;
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);
}
}, {
@ -139,10 +141,11 @@ 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)) {
if (self.combo.isViewVisible() || BI.isEqual(dateObj, dateStore) && !errorState) {
return;
}
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)
|| BI.isEqual(dateObj, dateStore) && errorState) {
self.storeValue = self.trigger.getValue();
self.setValue(self.trigger.getValue());
} else if (BI.isEmptyString(dateObj)) {
@ -151,6 +154,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}
self._checkDynamicValue(self.storeValue);
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);
errorState = false;
}
}]
}]

Loading…
Cancel
Save