From 3b67364916de05ffe7899013334e833c03dab30a Mon Sep 17 00:00:00 2001 From: Jin <22962980+JYC333@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:40:10 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20prev/next=20month?= =?UTF-8?q?=20date=20not=20link=20to=20right=20note?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/public/app/widgets/buttons/calendar.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/app/widgets/buttons/calendar.ts b/src/public/app/widgets/buttons/calendar.ts index 08ab2186b..b5a06cce9 100644 --- a/src/public/app/widgets/buttons/calendar.ts +++ b/src/public/app/widgets/buttons/calendar.ts @@ -346,9 +346,12 @@ export default class CalendarWidget extends RightDropdownButtonWidget { this.$month.append($weekNumber); dates.forEach(date => { + const tempDate = this.date; + this.date = date; const $day = this.createDay(dateNotesForPrevMonth, date.getDate(), date.getDay()); $day.addClass('calendar-date-prev-month'); this.$month.append($day); + this.date = tempDate; }); } @@ -383,9 +386,12 @@ export default class CalendarWidget extends RightDropdownButtonWidget { const dateNotesForNextMonth: DateNotesForMonth = await server.get(`special-notes/notes-for-month/${nextMonthStr}`); dates.forEach(date => { + const tempDate = this.date; + this.date = date; const $day = this.createDay(dateNotesForNextMonth, date.getDate(), date.getDay()); $day.addClass('calendar-date-next-month'); this.$month.append($day); + this.date = tempDate; }); }