Browse Source

REPORT-43220 fix: 年选择器左右校验逻辑错误

es6
iapyang 4 years ago
parent
commit
df9f428344
  1. 4
      src/widget/date/calendar/picker.year.js

4
src/widget/date/calendar/picker.year.js

@ -87,14 +87,14 @@ BI.YearPicker = BI.inherit(BI.Widget, {
_checkLeftValid: function () {
var o = this.options;
var valid = !(this._year === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear());
var valid = this._year > BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear();
this.left.setEnable(valid);
return valid;
},
_checkRightValid: function () {
var o = this.options;
var valid = !(this._year === BI.parseDateTime(o.max, "%Y-%X-%d").getFullYear());
var valid = this._year < BI.parseDateTime(o.max, "%Y-%X-%d").getFullYear();
this.right.setEnable(valid);
return valid;
},

Loading…
Cancel
Save