From 46ad0c0f72607395c368c2d9ce6636a4924ea77d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 25 Dec 2020 22:34:56 +0100 Subject: [PATCH] Fix date picker localization. --- .../angular/forms/editors/date-time-editor.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/framework/angular/forms/editors/date-time-editor.component.ts b/frontend/app/framework/angular/forms/editors/date-time-editor.component.ts index fd5e051bd..345434b5c 100644 --- a/frontend/app/framework/angular/forms/editors/date-time-editor.component.ts +++ b/frontend/app/framework/angular/forms/editors/date-time-editor.component.ts @@ -268,13 +268,13 @@ function getLocalizationSettings() { const options = { locale: DateHelper.getFnsLocale() }; for (let i = 0; i < 12; i++) { - const firstOfMonth = new Date(2020, i, 1); + const firstOfMonth = new Date(2020, i, 1, 12, 0, 0); localizedValues.months.push(format(firstOfMonth, 'LLLL', options)); } for (let i = 1; i <= 7; i++) { - const weekDay = new Date(2020, 11, i); + const weekDay = new Date(2020, 10, i, 12, 0, 0); localizedValues.weekdays.push(format(weekDay, 'EEEE', options)); localizedValues.weekdaysShort.push(format(weekDay, 'EEE', options));