Browse Source

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

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

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

@ -131,15 +131,12 @@ BI.YearPopup = BI.inherit(BI.Widget, {
var endDate = BI.parseDateTime(o.max, "%Y-%X-%d"); 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]) { 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(); v = BI.getDate().getFullYear();
this.selectedYear = ""; }
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));
this.navigation.setValue("");
} else {
this.selectedYear = v; this.selectedYear = v;
this.navigation.setSelect(BI.YearCalendar.getPageByYear(v)); this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));
this.navigation.setValue(v); this.navigation.setValue(v);
} }
}
}); });
BI.YearPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_popup", BI.YearPopup); BI.shortcut("bi.year_popup", BI.YearPopup);
Loading…
Cancel
Save