From e5b6faff6888a970ea8938f2f19097c57486dcc5 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 1 Apr 2022 20:43:07 +0200 Subject: [PATCH] Calendar: Fix months starting with Sunday (again) (#1794) --- src/components/common/CalendarModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/CalendarModal.tsx b/src/components/common/CalendarModal.tsx index ef5ce16fc..7dbe67719 100644 --- a/src/components/common/CalendarModal.tsx +++ b/src/components/common/CalendarModal.tsx @@ -337,7 +337,7 @@ function buildCalendarGrid(year: number, month: number) { date.setDate(1); date.setMonth(month); date.setFullYear(year); - const firstDay = date.getDay(); + const firstDay = date.getDay() || 7; const totalDaysInPrevMonth = new Date(year, month, 0).getDate(); for (let i = 1; i < firstDay; i++) {