FullCalendar SlotDuration 24:00 and weekNumbers: true alters date formatting

ぃ、小莉子 提交于 2019-12-12 04:32:45

问题


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

--

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.

--

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

--

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?


回答1:


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

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


来源:https://stackoverflow.com/questions/40915584/fullcalendar-slotduration-2400-and-weeknumbers-true-alters-date-formatting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!