Recurring Events in FullCalendar
FullCalendar offers comprehensive support for recurring events, including the ability to define complex scheduling patterns based on specific days of the week and time intervals.
Weekly Recurring Events
To create a recurring event on specific weekdays, such as every Monday and Thursday from 7:00 AM to 9:00 AM, utilize the following code:
events: [{ title:"Availability", start: '07:00', end: '09:00', dow: [ 1, 4 ] // Repeat monday and thursday }],
Specifying Recurrence Restrictions
To ensure recurrence within a specific timeframe, add start and end dates for events. For example, if the above event should repeat only during March and May, define the event and date ranges as follows:
eventId timeStart timeEnd dow dateStart dateEnd 1 07:00 09:00 [1,4] 2023/03/01 2023/05/01
On the client-side, use the eventRender function to filter and display events within the specified date ranges.
Handling Overnight Recurrences
FullCalendar supports overnight events. To define a recurring event that spans multiple days, specify an end time greater than 24:00. For instance, to create a weekly event that starts at 7:00 PM on Mondays and ends at 3:00 AM on Tuesdays, use the following event configuration:
{ start: '19:00', end: '27:00', dow: [1] }
The above is the detailed content of How to Create Recurring Events in FullCalendar?. For more information, please follow other related articles on the PHP Chinese website!