Skip to content

Conversation

@jackstenglein
Copy link
Contributor

This fixes an issue pointed out in #429 where some recurring events will not display. Here is a minimal example you can use to reproduce the problem:

  1. Pass the following parameters to the Scheduler component so that you can see all 24 hours of the day on the calendar. (You may have to adjust the timezone to reproduce the bug. My local timezone is Etc/GMT+5, but I am trying to view the calendar in the Etc/GMT+3 timezone)
timeZone="Etc/GMT+3"
week={{
  weekDays: [0, 1, 2, 3, 4, 5, 6],
  weekStartOn: 0,
  startHour: 0,
  endHour: 24,
  step: 60,
  navigation: true,
}}
  1. Add the following event to the calendar:
{
    event_id: 11,
    title: "Event 11 (Recurring)",
    subtitle: "This event is recurring daily",
    start: new Date("2025-04-14T00:00:00.000Z"),
    end: new Date("2025-04-14T01:00:00.000Z"),
    disabled: true,
    admin_id: [1, 2, 3, 4],
    recurring: new RRule({
      freq: RRule.DAILY,
      dtstart: convertDateToRRuleDate(new Date("2025-04-14T03:00:00.000Z")),
    }),
  },

The issue is that the recurrence gets created, and then convertEventTimeZone is called on the event, which pushes the event to the next day. Because the event is now on the next day, the filterTodayEvents function ignores it, and the event is never displayed. This fixes the issue by looking for recurrences in the range of [today-1, today+1] instead of [today, today+1]. If the timezoned event then moves into the next day, it is still included on the calendar.

@aldabil21 aldabil21 merged commit fa7a35c into aldabil21:master Apr 16, 2025
0 of 2 checks passed
@jackstenglein jackstenglein deleted the 429_missing_recurrences branch May 26, 2025 20:33
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

Successfully merging this pull request may close these issues.

2 participants