Browse Source

无JIRA任务 日期区间自定义高度

es6
windy 4 years ago
parent
commit
b1df6aa82e
  1. 10
      src/widget/timeinterval/dateinterval.js
  2. 10
      src/widget/timeinterval/timeinterval.js

10
src/widget/timeinterval/dateinterval.js

@ -14,7 +14,8 @@ BI.DateInterval = BI.inherit(BI.Single, {
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-date-interval", extraCls: "bi-date-interval",
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31" maxDate: "2099-12-31",
height: 24
}); });
}, },
_init: function () { _init: function () {
@ -26,14 +27,14 @@ BI.DateInterval = BI.inherit(BI.Single, {
this.right = this._createCombo(o.value.end); this.right = this._createCombo(o.value.end);
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
height: this.constants.height, height: o.height,
width: this.constants.width, width: this.constants.width,
text: "-" text: "-"
}); });
BI.createWidget({ BI.createWidget({
element: self, element: self,
type: "bi.center", type: "bi.center",
height: this.constants.height, height: o.height,
items: [{ items: [{
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
@ -68,7 +69,8 @@ BI.DateInterval = BI.inherit(BI.Single, {
var combo = BI.createWidget({ var combo = BI.createWidget({
type: "bi.dynamic_date_combo", type: "bi.dynamic_date_combo",
behaviors: o.behaviors, behaviors: o.behaviors,
value: v value: v,
height: o.height,
}); });
combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () { combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {
self._clearTitle(); self._clearTitle();

10
src/widget/timeinterval/timeinterval.js

@ -14,7 +14,8 @@ BI.TimeInterval = BI.inherit(BI.Single, {
return BI.extend(conf, { return BI.extend(conf, {
extraCls: "bi-time-interval", extraCls: "bi-time-interval",
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31" maxDate: "2099-12-31",
height: 24
}); });
}, },
_init: function () { _init: function () {
@ -26,14 +27,14 @@ BI.TimeInterval = BI.inherit(BI.Single, {
this.right = this._createCombo(o.value.end); this.right = this._createCombo(o.value.end);
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
height: this.constants.height, height: o.height,
width: this.constants.width, width: this.constants.width,
text: "-" text: "-"
}); });
BI.createWidget({ BI.createWidget({
element: self, element: self,
type: "bi.center", type: "bi.center",
height: this.constants.height, height: o.height,
items: [{ items: [{
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
@ -68,7 +69,8 @@ BI.TimeInterval = BI.inherit(BI.Single, {
var combo = BI.createWidget({ var combo = BI.createWidget({
type: "bi.dynamic_date_time_combo", type: "bi.dynamic_date_time_combo",
behaviors: o.behaviors, behaviors: o.behaviors,
value: v value: v,
height: o.height,
}); });
combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () { combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {
self._clearTitle(); self._clearTitle();

Loading…
Cancel
Save