From 39a0ea183eb7fccb343097934e14926bcdc207cd Mon Sep 17 00:00:00 2001 From: Treecat Date: Mon, 21 Nov 2022 13:47:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-85040=20fix:=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=97=B6=E9=97=B4=E4=BC=9A=E8=B6=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/calendar/calendar.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 88ccf198a..0a9d40e05 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -156,13 +156,21 @@ BI.Calendar = BI.inherit(BI.Widget, { return BI.map(items, function (i, item) { return BI.map(item, function (j, td) { 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, { type: "bi.calendar_date_item", once: false, forceSelected: true, - value: o.year + "-" + month + "-" + td.text, + value: year + "-" + month + "-" + td.text, disabled: td.disabled, - cls: td.lastMonth || td.nextMonth ? "not-current-month-day": "", + cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", lgap: 2, rgap: 2, tgap: 4,