Browse Source

Merge pull request #208291 in DEC/fineui from master to feature/x

* commit 'c55fb54c5f05f58dd8b09d08e5df8592a3845554':
  REPORT-85040 fix: 日期控件时间会超
research/test
superman 2 years ago
parent
commit
0928aa4a66
  1. 10
      src/case/calendar/calendar.js

10
src/case/calendar/calendar.js

@ -156,11 +156,19 @@ BI.Calendar = BI.inherit(BI.Widget, {
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
return BI.map(item, function (j, td) { return BI.map(item, function (j, td) {
var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);
var year = o.year;
if (month > 12) {
month = 1;
year++;
} else if (month < 1) {
month = 12;
year--;
}
return BI.extend(td, { return BI.extend(td, {
type: "bi.calendar_date_item", type: "bi.calendar_date_item",
once: false, once: false,
forceSelected: true, forceSelected: true,
value: o.year + "-" + month + "-" + td.text, value: year + "-" + month + "-" + td.text,
disabled: td.disabled, disabled: td.disabled,
cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "",
lgap: 2, lgap: 2,

Loading…
Cancel
Save