I'm trying to use the changeView action from inside the dayClick method, however the calendar isn't being recognized on the element it was initialzed on.
Here's my code:
id='calendar'
...
dayClick={(date, jsEvent, view) => {
if (view.name === 'month') {
// Clicked on the day number
$('#calendar')
.fullCalendar('changeView', 'agendaDay'/* or 'basicDay' */)
.fullCalendar('gotoDate', date.year(), date.month(), date.date());
}
}}
When this code runes I get the following warning in the console:
Attempting to call a FullCalendar method on an element with no calendar.
I'm trying to use the changeView action from inside the dayClick method, however the calendar isn't being recognized on the element it was initialzed on.
Here's my code:
When this code runes I get the following warning in the console: