From 2722e1b07e142e69597f49adc22d0621495ad32c Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Sat, 10 Dec 2022 22:54:58 +0100 Subject: [PATCH] fix(calendar): calendar breaks when initialDate is string Whenever a given initialDate is made out of a string, a possible later ' clean' breaks the calendar refresh by console error. That's because the initialDate is taken as a month reference when no date is given (via clear), but it was forgotten to parse the initialDate beforehand (was working fine as long as it's a JS Date object already) --- src/definitions/modules/calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/modules/calendar.js b/src/definitions/modules/calendar.js index 3a7a880c29..7ae3ef95d8 100644 --- a/src/definitions/modules/calendar.js +++ b/src/definitions/modules/calendar.js @@ -255,7 +255,7 @@ today = new Date(), date = module.get.date(), focusDate = module.get.focusDate(), - display = module.helper.dateInRange(focusDate || date || settings.initialDate || today) + display = module.helper.dateInRange(focusDate || date || parser.date(settings.initialDate, settings) || today) ; if (!focusDate) {