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 } )}
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:
Share Improve this question asked Jun 25, 2015 at 14:40 user2209090user2209090 1541 silver badge10 bronze badges$('#calendar').fullCalendar({ header: { right: '', center: 'prev, title, next', left: '' }, columnFormat: { month: 'd' //also tried 'D' but a number displayed instead } )}
4 Answers
Reset to default 4The shortest you can get is two letters
$('#calendar').fullCalendar({
header: {
right: '',
center: 'prev, title, next',
left: ''
},
columnFormat: {
month: 'dd' //also tried 'D' but a number displayed instead
}
});
This library uses moment library and all possible formats can be found here
From version 2.2.4,
You have to modify like this.
$('#calendar').fullCalendar({
...
...
...,
views: {
week: { // name of view
columnFormat: 'dd'
}
}
});
If you are using dayGridMonth, inside the option apply ,
dayHeaderFormat: {
weekday: 'narrow'
},
You can use slotLabelFormat:
slotLabelFormat: [
{ weekday: 'narrow' },
]
All possible formats are in documentation: https://fullcalendar.io/docs/v4/date-formatting
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744963492a4603530.html
评论列表(0条)