Browse Source

Pull request #2666: REPORT-70807 修复年份日期控件水印只显示无限制

Merge in VISUAL/fineui from ~FREDDY/fineui:master to master

* commit '6d30eca76f8d7f8d43c6d72ef7840e67e3238009':
  REPORT-70807 fix:给watermark加个props
  REPORT-70807 fix:年份日期控件适配watermark

(cherry picked from commit e60d977be0)
master
Freddy 3 years ago committed by freddy
parent
commit
11a0f98c42
  1. 8
      src/widget/year/combo.year.js
  2. 9
      src/widget/year/trigger.year.js

8
src/widget/year/combo.year.js

@ -24,7 +24,8 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
min: o.minDate,
max: o.maxDate,
height: o.height - border,
value: o.value || ""
value: o.value || "",
watermark: o.watermark
});
this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () {
if (self.combo.isViewVisible()) {
@ -211,8 +212,11 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, {
isStateValid: function () {
return this.trigger.isValid();
}
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});
BI.DynamicYearCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";

9
src/widget/year/trigger.year.js

@ -10,7 +10,8 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-year-trigger",
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24
height: 24,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
@ -35,7 +36,7 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
},
hgap: c.hgap,
vgap: c.vgap,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: o.watermark,
allowBlank: true,
errorText: function (v) {
if (BI.isPositiveInteger(v)) {
@ -188,6 +189,10 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
getKey: function () {
return this.editor.getValue() | 0;
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.DynamicYearTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";

Loading…
Cancel
Save