I have been using the Fullcalendar plugin and I am wondering if there is a way to navigate from day to day instead of in 3-day increments when using the resourceTimeline view with a duration set to 3 days.
Thank you
calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'fr',
height: '95%',
timeZone: 'Europe/Paris',
initialView: 'resourceTimelineDay',
views: {
resourceTimelineDay: {
buttonText: 'Calendrier',
titleFormat: {year: 'numeric', month: 'long', day: 'numeric', weekday: 'long'}
},
listDay: {
buttonText: 'Liste',
titleFormat: {year: 'numeric', month: 'long', day: 'numeric', weekday: 'long'}
},
resourceTimelineTenDay: {
type: 'resourceTimeline',
duration: { days: 3 },
buttonText: '3 days'
}
},
aspectRatio: 1.5,
headerToolbar: {
left: 'prev,next',
center: 'title',
right: 'resourceTimelineDay,listDay,resourceTimelineTenDay'
},
validRange: {
start: data.jourMin,
end: data.jourMax
},
slotMinTime: '08:00:00',
slotMaxTime: '24:00:00',
slotMinWidth: 38,
selectable: true,
editable: true,
eventOverlap: false,
slotDuration: data.dureeSlot,
resourceAreaHeaderContent: 'Lieux',
resources: './assets/json/salles.php',
events: './assets/json/events.php',
resourceAreaWidth: "10%",
resourceOrder: 'title'
});
EDIT : I have experimented with visibleRange but it did not achieve the desired result. I followed the documentation and added this code to my custom view:
visibleRange: function(currentDate) {
// Generate a new date for manipulation
var startDate = new Date(currentDate.valueOf());
var endDate = new Date(currentDate.valueOf());
// Adjust the start & end dates
startDate.setDate(startDate.getDate() - 1); // One day before
endDate.setDate(endDate.getDate() + 2); // Two days ahead
return { start: startDate, end: endDate };
}