问题
How can I change the formatting of the date in Fullcalendar -> weekview.
It now says:
Sun 7/24 Mon 7/25 Tue 7/26 Wed 7/27 Thu 7/28 Fri 7/29 Sat 7/30
I want to switch month and day around so it says
Sun 24/7 Mon 25/7 Tue 26/7 Wed 27/7 Thu 28/7 Fri 29/7 Sat 30/7
which is the way our users are used to in the country where I live/work.
回答1:
I have found a solution:
columnFormat: {
month: 'ddd',
week: 'ddd d/M',
day: 'dddd d/M'
},
回答2:
There is a mistake, the first character must be lowercase:
columnFormat: { month: 'ddd', week: 'ddd d/M', day: 'dddd d/M' },
回答3:
try this then..
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
defaultView: 'basicWeek',
editable: true,
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1) // change the format here.
},
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2)
}
来源:https://stackoverflow.com/questions/6872429/changing-the-format-of-the-day-title-in-weekview