|
|
|
@ -30,25 +30,30 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
this.storeTriggerValue = ""; |
|
|
|
|
var date = BI.getDate(); |
|
|
|
|
this.storeValue = opts.value; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.htape", |
|
|
|
|
cls: "bi-border bi-border-radius", |
|
|
|
|
cls: "bi-border bi-border-radius bi-focus-shadow", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: opts.height, |
|
|
|
|
width: opts.height - 2, |
|
|
|
|
height: opts.height - 2, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: opts.height |
|
|
|
|
width: opts.height - 2 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.combo", |
|
|
|
|
cls: "bi-focus-shadow", |
|
|
|
|
destroyWhenHide: true, |
|
|
|
|
container: opts.container, |
|
|
|
|
ref: function () { |
|
|
|
@ -186,7 +191,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
eventName: BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
var value = self.popup.getValue(); |
|
|
|
|
if(self._checkValue(value)) { |
|
|
|
|
if (self._checkValue(value)) { |
|
|
|
|
self.setValue(value); |
|
|
|
|
} |
|
|
|
|
self.combo.hideView(); |
|
|
|
@ -230,8 +235,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-font", |
|
|
|
|
width: opts.height, |
|
|
|
|
height: opts.height, |
|
|
|
|
width: opts.height - 2, |
|
|
|
|
height: opts.height - 2, |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.IconButton.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
@ -253,6 +258,12 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.comboWrapper = _ref; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
top: 1, |
|
|
|
|
left: 1, |
|
|
|
|
right: 1, |
|
|
|
|
bottom: 1 |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -269,7 +280,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
switch (type) { |
|
|
|
|
case BI.DynamicDateTimeCombo.Dynamic: |
|
|
|
|
this.changeIcon.setVisible(true); |
|
|
|
|
this.comboWrapper.attr("items")[0].width = o.height; |
|
|
|
|
this.comboWrapper.attr("items")[0].width = o.height - 2; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
@ -287,6 +298,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
return BI.isNotEmptyObject(v.value); |
|
|
|
|
case BI.DynamicDateCombo.Static: |
|
|
|
|
var value = v.value || {}; |
|
|
|
|
|
|
|
|
|
return !BI.checkDateVoid(value.year, value.month, value.day, o.minDate, o.maxDate)[0]; |
|
|
|
|
default: |
|
|
|
|
return true; |
|
|
|
|