Hello I am trying to use multiple calendars in one page and I need to add an unique ID for each calendar. Is there an option like in my code below to achieve that?
document.addEventListener("DOMContentLoaded", function () {
var calendarEl = document.getElementById("calendar")
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: { ... },
initialView: "timeGridDay",
...
id: "34" // output: Unknown option 'id'
}
You can just add a new property to the calendar object once it is created and before you render it.
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {...},
initialView: "timeGridDay",
}
calendar.id = "34"
calendar.render()