Skip to content

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

@MaxDiOrio

Description

@MaxDiOrio

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions