Calendar: Fix months starting with Sunday (again) (#1794)

This commit is contained in:
Alexander Zinchuk 2022-04-01 20:43:07 +02:00
parent c9cc588704
commit e5b6faff68

View File

@ -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++) {