79547743

Date: 2025-04-01 05:14:39
Score: 0.5
Natty:
Report link

I just completed my work on Fullcalendar + RRule

Example for Fullcalendar + RRule for event recurrent

This sharing for newbie to get started on the right direction.

Install dependencies

npm install --save \
  @fullcalendar/rrule \
  @fullcalendar/core \
  @fullcalendar/daygrid

Example implementation

import { Calendar } from '@fullcalendar/core'
import rrulePlugin from '@fullcalendar/rrule'
import dayGridPlugin from '@fullcalendar/daygrid'

let calendarEl = document.getElementById('calendar')
let calendar = new Calendar(calendarEl, {
    plugins: [ rrulePlugin, dayGridPlugin ],
    events: [
        {
            title: "Afternoon for 3 days",
            startTime: "12:00",
            endTime: "16:00",
            rrule: {
                freq: "daily", // Every day
                count: 3, // Repeat 3 times
                dtstart: "2025-04-01", // Start from 2025-04-01
                interval: 1
            }
        },
        {
            title: "Weekly Morning - Mon to Fri",
            startTime: "12:00",
            endTime: "16:00",
            rrule: {
                freq: "weekly", // Every week
                byweekday: [0,1,2,3,4], // Mon - Fri
                dtstart: "2025-04-13" // Start from 2025-04-13
            },
            exdate: ["2025-04-15"] // Exclude 2025-04-15
        }
    ]
})

calendar.render()
Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Thearoth