|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
}] |
|
|
|
|