Browse Source

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

master
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 () { _checkLeftValid: function () {
var o = this.options; 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); this.left.setEnable(valid);
return valid; return valid;
}, },
_checkRightValid: function () { _checkRightValid: function () {
var o = this.options; 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); this.right.setEnable(valid);
return valid; return valid;
}, },

Loading…
Cancel
Save