-1

I am using full calendar scheduler.. and the setting

dayOfMonthFormat: 'ddd - MMM DD',

to give columns like Mon - Nov 28

I also have weekNumbers: true set

this works great for views with slots, i.e. a minTime, maxTime, a slotDuration i.e. 3 hours.

I get a display like this

enter image description here

--

However, if I have a view where the slotDuration is 24 hours, I can have the weekNumbers but the Date Formatting is ignored / wrong.

i.e.

enter image description here

--

I can force the date to the correct format by putting slotLabelFormat: 'ddd - MMM DD', in my view.. but this means I get no weekNumbers

enter image description here

--

Does anyone know of a solution where both my custom date / column format will work, but that I will also get my weekNumbers, with 24 hour slots?

Mike Irving
  • 1,480
  • 1
  • 12
  • 20

1 Answers1

1

FullCalendar support suggest this, which worked out in my case.

slotLabelFormat: [
    '[Week] W',
    'ddd - MMM DD'
]

Update: 11/03/2022

for FullCalendar v5 I am using:

slotLabelFormat: [
    function(date) { return moment(date.date).format('[Week] W') },
    function(date) { return moment(date.date).format('ddd - MMM DD') }
], 
Mike Irving
  • 1,480
  • 1
  • 12
  • 20