-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Description
Use case describing the bug
WHEN fetching events from external iCalendar with default config
AND the fetched event's start and end timestamp is todays date without the time (i.e 20230427)
THEN this event is filtered out without being displayed
Root cause
The bug is in the line 470 in the calendarutils.js since endDate will have time 00.00:00 which is <= today (which also has time 00:00:00).
Proposed solution
Move the code block at line 485 before the filtering described above, to set the time for endDate to end of the day.
I will create PR with this suggestion.
Example
config.js
{
module: "calendar",
header: "My calendar",
position: "top_left",
config: {
calendars: [
{
url: "http://mycompany.com/calendar.ics"
}
]
}
}iCalendar event
BEGIN:VEVENT
UID:a950cb3c-b067-422a-94c6-5399ffb02b7b
SEQUENCE:0
DTSTAMP:20230427T092247
DTSTART;VALUE=DATE:20230427
DTEND;VALUE=DATE:20230427
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE
SUMMARY:My event
LOCATION:My location
DESCRIPTION:My description
END:VEVENT
Reactions are currently unavailable