When scheduling appointments or availability in a calendar, it's common to need events that recur on specific days. FullCalendar provides options to handle recurring events, including daily repetitions.
To create a daily recurring event, specify the days of the week using the dow property. For example, the following event recurs only on Mondays from 7:00 AM to 9:00 AM:
{ title: "Morning Appointment", start: "07:00", end: "09:00", dow: [1] // Repeat on Mondays }
If you want the recurring events to have specific start and end dates, you can use the ranges property. Each range represents a period when the event should be active. For instance, the following event recurs every Monday and Thursday during March, May, and the entire year of 2017:
{ id: 1, start: "10:00", end: "12:00", dow: [1, 4], ranges: [ { start: "2015/03/01", end: "2015/04/01" }, { start: "2015/05/01", end: "2015/06/01" }, { start: "2016/01/01", end: "2017/01/01" } ] }
The eventRender callback can be used to filter out any events that fall outside of the specified ranges.
FullCalendar supports overnight events. Simply specify an end time that goes beyond 24:00. For example, the following event recurs every Tuesday from 10:00 PM to 3:00 AM the next day:
{ title: "Overnight Event", start: "22:00", end: "03:00", dow: [2] }
The above is the detailed content of How to Create Recurring Events with Specific Ranges in FullCalendar?. For more information, please follow other related articles on the PHP Chinese website!