From d588fab98130442f196f10158469225a6902c24b Mon Sep 17 00:00:00 2001 From: Jon Kolb Date: Wed, 2 Mar 2022 21:56:42 -0500 Subject: [PATCH] Don't adjust startDate for full day events if endDate is in the past --- CHANGELOG.md | 1 + modules/default/calendar/calendarutils.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 588889e5..82541390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ _This release is scheduled to be released on 2022-04-01._ - Improved husky setup not blocking `git commit` if `husky` or `npm` is not installed. - Using a consistent spelling of MagicMirror². - Fix minor console output issue for loading translations (#2814). +- Don't adjust startDate for full day events if endDate is in the past ## [2.18.0] - 2022-01-01 diff --git a/modules/default/calendar/calendarutils.js b/modules/default/calendar/calendarutils.js index c00e50d8..58e05d64 100644 --- a/modules/default/calendar/calendarutils.js +++ b/modules/default/calendar/calendarutils.js @@ -470,7 +470,7 @@ const CalendarUtils = { } // Adjust start date so multiple day events will be displayed as happening today even though they started some days ago already - if (fullDayEvent && startDate <= today) { + if (fullDayEvent && startDate <= today && endDate > today) { startDate = moment(today); } // if the start and end are the same, then make end the 'end of day' value (start is at 00:00:00)