Reputation: 115
I am unable to get eventRender to work. anyway I add it, I get "Unknown option 'eventRender'.
What am I doing wrong?
Here a short code that already show the error:
<body>
<script>
document.addEventListener('DOMContentLoaded', function() {
var date = new Date();
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth',
eventRender: function(info){
console.log("1");
},
events: [
{
title: "hello",
start: date,
allDay: true,
}
],
});
calendar.render();
});
</script>
<div id = "calendar">
</div>
</body>
Upvotes: 7
Views: 15467
Reputation: 194
if you are using new version, use eventDidMount like this:
eventDidMount: function(info) {console.log(1);}
look this example from documentation: event tootip example
Upvotes: 17