MMM-GoogleCalendar icon indicating copy to clipboard operation
MMM-GoogleCalendar copied to clipboard

[BUG]: Full day events not showing on MMM-CalendarExt3

Open MaxDiOrio opened this issue 1 year ago • 1 comments

If an all day event is created in Google Calendar: image

I can see that MMM-GoogleCalendar is detecting the event (there are only two events in this new calendar, the all day event and a test event from 2-3AM) : MMM-GoogleCalendar: 2 events loaded for c_178da626c4

Google Calendar module does show it: image

The test event from 2-3AM shows up fine in MMM-CalendarExt3, but the all day event does not.

No events from MMM-GoogleCalendar were showing until I added the following code to the MMM-CalendarExt3 module config:

    eventTransformer: (ev) => { return ev; },
    preProcessor: (e) => {
            if (e.startDate) return e // when event coming from default module, skip conversion.
            if (e.start?.dateTime) {
                    e.startDate = new Date(e.start.dateTime).valueOf()
            } else if (e.start?.date) {
                    e.startDate = new Date(`${e.start.date}T00:00:00`).valueOf()
            }
            if (e.end?.dateTime) {
                    e.endDate = new Date(e.end.dateTime).valueOf()
            } else if (e.end?.date) {
                    e.endDate = new Date(`${e.end.date}T00:00:00`).valueOf()
            }
            e.title = e.summary
            e.fullDayEvent = (e.start?.date) ? true : false
            return e
    },

I'm not seeing any errors being generated - just not showing up. Anyone experience this before?

MaxDiOrio avatar Dec 23 '24 16:12 MaxDiOrio

Hi @MaxDiOrio , I did a small change that should fix this issue. Can you try to update and see if the events now show? Thanks!

randomBrainstormer avatar May 21 '25 10:05 randomBrainstormer