'Fullcalendar Week Title Format
Is it possible to get fullcalendar to show week titles as a single letter? So instead of the default:
Mon Tue Wed Thu Fri Sat
how can I display:
S M T W T F S
I've tried:
$('#calendar').fullCalendar({ header: { right: '', center: 'prev, title, next', left: '' }, columnFormat: { month: 'd' //also tried 'D' but a number displayed instead } )}
Solution 1:[1]
From version 2.2.4,
You have to modify like this.
$('#calendar').fullCalendar({
...
...
...,
views: {
week: { // name of view
columnFormat: 'dd'
}
}
});
Solution 2:[2]
If you are using dayGridMonth, inside the option apply ,
dayHeaderFormat: {
weekday: 'narrow'
},
Solution 3:[3]
You can use slotLabelFormat:
slotLabelFormat: [
{ weekday: 'narrow' },
]
All possible formats are in documentation: https://fullcalendar.io/docs/v4/date-formatting
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Syed Ibrahim |
| Solution 2 | Adrika Gupta |
| Solution 3 | Nacho |
