Recurring events
Recurring events guide for @mantine/schedule
Docs
Package
Recurring events
@mantine/schedule supports recurring events via RFC 5545
recurrence rules (powered by the rrule library).
There are three event shapes:
- Series event – has a
recurrencefield with anrrulestring - Override event – has
recurringEventId+recurrenceIdto replace one generated occurrence - One-off event – has none of the recurring fields (regular event)
Series event
Series events define recurrence with recurrence.rrule. You can optionally add
recurrence.exdate to exclude specific occurrences and recurrence.dtstart to set
an explicit series start date (defaults to start).
Common rrule patterns:
FREQ=DAILY;COUNT=10– every day, 10 occurrencesFREQ=WEEKLY;BYDAY=MO,WE,FR– every Mon, Wed, FriFREQ=MONTHLY;BYMONTHDAY=15– 15th of every monthFREQ=YEARLY;COUNT=5– once a year, 5 times
Override event
Override events replace a single generated occurrence from a series.
Use recurringEventId to point to the series and recurrenceId to identify
which occurrence to replace (in YYYY-MM-DD HH:mm:ss format matching the original start time):
How rendering works
Each view expands recurring events only for its visible date range:
- Parse the
rrulestring and generate occurrence start times within the range - Remove occurrences that match
exdateentries - Replace matching occurrences with override events
- Merge with one-off events and render
Generated instances include a recurringInstance metadata object with:
isRecurringInstance– alwaystruefor generated eventsrecurringEventId– parent series idrecurrenceId– occurrence identifieroriginalStart/originalEnd– the occurrence dates before any overrides
expandRecurringEvents utility
You can use the expandRecurringEvents utility directly for custom logic:
recurrenceExpansionLimit prop
All views accept a recurrenceExpansionLimit prop (default 2000) to cap the number
of generated instances per recurring series. This prevents performance issues with
unbounded recurrence rules (e.g., FREQ=DAILY without COUNT or UNTIL).
Note that the limit applies independently to each series, so a schedule with
multiple unbounded series may generate up to limit × number of series total instances.