Browse Source

Pull request #1479: KERNEL-5172 v为string时===永不成立

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

* commit '8f14d5f4aea3b0a821b53e17cccb20c6777f321e':
  KERNEL-5172 fix: v为string时永不===不成立
master
Teller 4 years ago
parent
commit
11fbba77c4
  1. 3
      src/widget/yearmonth/trigger.yearmonth.js

3
src/widget/yearmonth/trigger.yearmonth.js

@ -68,8 +68,9 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height, height: o.height,
validationChecker: function (v) { validationChecker: function (v) {
if (isYear) { if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, v === minDate.getFullYear() ? minDate.getMonth() + 1 : 1, 1, o.min, o.max)[0]); return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === minDate.getFullYear() ? minDate.getMonth() + 1 : 1, 1, o.min, o.max)[0]);
} }
return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]); return v === "" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);
}, },
quitChecker: function () { quitChecker: function () {

Loading…
Cancel
Save