Browse Source

REPORT-46261 fix: 年控件范围校验错误时,赋值为当前年

es6
iapyang 4 years ago
parent
commit
2675d19afd
  1. 11
      src/widget/date/calendar/popup.year.js

11
src/widget/date/calendar/popup.year.js

@ -131,14 +131,11 @@ BI.YearPopup = BI.inherit(BI.Widget, {
var endDate = BI.parseDateTime(o.max, "%Y-%X-%d");
if (BI.checkDateVoid(v, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), "%Y-%X-%d"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), "%Y-%X-%d"))[0]) {
v = BI.getDate().getFullYear();
this.selectedYear = "";
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));
this.navigation.setValue("");
} else {
this.selectedYear = v;
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));
this.navigation.setValue(v);
}
this.selectedYear = v;
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));
this.navigation.setValue(v);
}
});
BI.YearPopup.EVENT_CHANGE = "EVENT_CHANGE";

Loading…
Cancel
Save