Home > Web Front-end > JS Tutorial > How to Create Recurring Events in FullCalendar?

How to Create Recurring Events in FullCalendar?

Linda Hamilton
Release: 2024-11-11 01:48:03
Original
463 people have browsed it

How to Create Recurring Events in FullCalendar?

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
}],
Copy after login

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 
Copy after login

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]
}
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template