eouia / MMM-CalendarExt

Calendar views for MagicMirror
MIT License
55 stars 18 forks source link

Recurring Events Appear In Multiples Today #50

Closed jeffreyjwinn closed 5 years ago

jeffreyjwinn commented 5 years ago

Had an issue with recurring, all day events appearing in multiples today on the "daily" view. Changed the following in components/Calendar.js:

On line 177 around this recurring section:

// The "dates" array contains the set of dates within our desired date range range that are valid
                                        // for the recurrence rule.  *However*, it"s possible for us to have a specific recurrence that
                                        // had its date changed from outside the range to inside the range.  For the time being,
                                        // we"ll handle this by adding *all* recurrence entries into the set of dates that we check,
                                        // because the logic below will filter out any recurrences that don"t actually belong within
                                        // our display range.
                                        // TODO: Find a better way to handle this.
                                        if (event.recurrences != undefined)

...changed:

if (event.recurrences != undefined)

to:

if (event.recurrences == undefined)

...I'm a brewer, not a coder, but this solved it for me...at least for now.

eouia commented 5 years ago

Can you make PR for this? I'll examine and decide to accept. Thanks