1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
themeSystem: 'bootstrap5',
events: $.ajax({
url :"ajax/list_evenement_calendrier.php",
success: function(response) {
return response.data; }
}),
buttonText: {
today: 'Aujourd\'hui',
month: 'Mois',
week: 'Semaine',
day: 'Jour',
list: 'Liste'
},
locale: 'fr',
firstDay:1,
businessHours: true,
businessHours: {
// days of week. an array of zero-based day of week integers (0=Sunday)
daysOfWeek: [ 1, 2, 3, 4 ,5], // Monday - Thursday
startTime: '8:00', // a start time (10am in this example)
endTime: '18:00', // an end time (6pm in this example)
},
allDayDefault: false,
minTime:'7:00',
initialView: 'timeGridWeek',
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
}
});
calendar.render();
}); |
Partager