Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MaxDiOrio opened this issue Dec 23, 2024 · 0 comments
Open

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

MaxDiOrio opened this issue Dec 23, 2024 · 0 comments

Comments

@MaxDiOrio
Copy link

MaxDiOrio commented Dec 23, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant