Calendar: Fix months starting from Sunday (#1312)

This commit is contained in:
Alexander Zinchuk 2021-07-23 17:01:49 +03:00
parent cf96a04364
commit 5ba055400b

View File

@ -269,7 +269,7 @@ function buildCalendarGrid(year: number, month: number) {
date.setMonth(month);
date.setDate(1);
const monthStartDay = date.getDay();
const monthStartDay = date.getDay() || 7;
// Fill empty cells
for (let i = 1; i < monthStartDay; i++) {
grid.push(0);