Browse Source

Pull request #1758: QFX-4170 && BI-81317 修灰化

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '71286e13d3f647e72b34104586d34e167018a499':
  QFX-4170 && BI-81317 修灰化
es6
windy 4 years ago
parent
commit
f4fa6a052f
  1. 6
      src/widget/year/card.year.js
  2. 4
      src/widget/yearquarter/trigger.yearquarter.js

6
src/widget/year/card.year.js

@ -103,9 +103,9 @@ BI.StaticYearCard = BI.inherit(BI.Widget, {
afterCardShow: function () {
this.setValue(self.selectedYear);
var calendar = this.getSelectedCard();
self.backBtn.setEnable(!calendar.isFrontYear());
self.preBtn.setEnable(!calendar.isFinalYear());
// var calendar = this.getSelectedCard();
// self.backBtn.setEnable(!calendar.isFrontYear());
// self.preBtn.setEnable(!calendar.isFinalYear());
}
});

4
src/widget/yearquarter/trigger.yearquarter.js

@ -67,7 +67,9 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
}
return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 4) && !BI.checkDateVoid(self.yearEditor.getValue(), (v - 1) * 3 + 1, 1, o.min, o.max)[0]);
var year = self.yearEditor.getValue();
return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 4) && (BI.isEmptyString(year) ? true : !BI.checkDateVoid(self.yearEditor.getValue(), (v - 1) * 3 + 1, 1, o.min, o.max)[0]));
},
quitChecker: function () {
return false;

Loading…
Cancel
Save