Merge pull request #2818 from kolbyjack/fix/changing-start-date

Don't adjust startDate for full day events if endDate is in the past
This commit is contained in:
Michael Teeuw 2022-03-11 15:36:25 +01:00 committed by GitHub
commit 2a989bc235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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. - Improved husky setup not blocking `git commit` if `husky` or `npm` is not installed.
- Using a consistent spelling of MagicMirror². - Using a consistent spelling of MagicMirror².
- Fix minor console output issue for loading translations (#2814). - 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 ## [2.18.0] - 2022-01-01

View File

@ -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 // 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); 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) // if the start and end are the same, then make end the 'end of day' value (start is at 00:00:00)