In Fullcalendar, when using the resource timeline view, if I set my visibleRange to, let's say, 2023-08-01 to 2023-11-30, you'll see labels at the top with the names of the months as you scroll left/right. However when you use dates that aren't the first/last day of a given month, the month labels disappear and leave you with only the days of the month. How can I keep the month labels visible when using date ranges that don't begin/end with the first and last days of a month?
Here's what I have in my views settings. Note the PrevQtr view doesn't start on the 1st, and NextQtr view doesn't end on the 31st. In these views, there are no month labels. In the CurrQtr view, the month labels appear.
views:{
resourceTimelineWeek: {
slotDuration: { days: 1 }
},
CurrQtr: {
type: 'resourceTimeline',
visibleRange: function(currentDate) {
return { start: '2023-06-01 00:00:00.000', end: '2023-08-31 23:59:59' };
},
buttonText: 'Curr Qtr'
},
NextQtr: {
type: 'resourceTimeline',
visibleRange: function(currentDate) {
return { start: '2023-09-01 00:00:00.000', end: '2023-12-04 23:59:59' };
},
buttonText: 'Curr Qtr +1'
},
PrevQtr: {
type: 'resourceTimeline',
visibleRange: function(currentDate) {
return { start: '2023-03-02 00:00:00.000', end: '2023-05-31 23:59:59' };
},
buttonText: 'Curr Qtr -1'
}
}
After 2 days of searching, I figured it out 20 minutes after posting. I just added the following code to my config. Leaving this up in case anyone else needs this info.
This works both in the
var calendar = new FullCalendar.Calendar(calendarEl,config as well as in the specific view config.