<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var events = [];
var eventsCache = {};
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
eventSources: [{
cache: false,
url: 'loadevent.php',
type: 'POST',
extraParams: function() { // Prevent caching data from database in fullcalendar
return {
cachebuster: new Date().valueOf()
};
},
}],
});
calendar.render();
calendar.refetchEvents();
});
</script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var events = [];
var eventsCache = {};
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
eventSources: [{
cache: false,
url: 'loadevent.php',
type: 'POST',
extraParams: function() { // Prevent caching data from database in fullcalendar
return {
cachebuster: new Date().valueOf()
};
},
}],
});
calendar.render();
calendar.refetchEvents();
});
</script>
No comments:
Post a Comment