Fixes day of month start day (#1389)

pull/1399/head
Alex van Andel 2021-12-29 09:27:49 +01:00 committed by GitHub
parent 9b583694a3
commit bc46f4fbc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ function DatePicker({
return [];
}
// Create placeholder elements for empty days in first week
let weekdayOfFirst = browsingDate.startOf("month").day();
let weekdayOfFirst = browsingDate.date(1).day();
if (weekStart === "Monday") {
weekdayOfFirst -= 1;
if (weekdayOfFirst < 0) weekdayOfFirst = 6;