|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
BI.DynamicYearCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-year-combo bi-border bi-border-radius bi-focus-shadow", |
|
|
|
|
baseCls: "bi-year-combo", |
|
|
|
|
behaviors: {}, |
|
|
|
|
minDate: "1900-01-01", // 最小日期
|
|
|
|
|
maxDate: "2099-12-31", // 最大日期
|
|
|
|
@ -11,15 +11,13 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
o.height -= 2; |
|
|
|
|
BI.isNumeric(o.width) && (o.width -= 2); |
|
|
|
|
BI.DynamicYearCombo.superclass._init.apply(this, arguments); |
|
|
|
|
this.storeValue = o.value; |
|
|
|
|
this.trigger = BI.createWidget({ |
|
|
|
|
type: "bi.dynamic_year_trigger", |
|
|
|
|
min: o.minDate, |
|
|
|
|
max: o.maxDate, |
|
|
|
|
height: o.height, |
|
|
|
|
height: o.height - 2, |
|
|
|
|
value: o.value || "" |
|
|
|
|
}); |
|
|
|
|
this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () { |
|
|
|
@ -61,6 +59,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
this.combo = BI.createWidget({ |
|
|
|
|
type: "bi.combo", |
|
|
|
|
cls: "bi-border bi-border-radius", |
|
|
|
|
container: o.container, |
|
|
|
|
isNeedAdjustHeight: false, |
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|