问题
These days i'm working with the fullcalendar. I want to change the format of the date in the weekview. I found that many people succeeded with columnFormat: { month: 'ddd', week: 'ddd d/M', day: 'dddd d/M' }, but this one doesn't work for me. Maybe the raison is i used spanish as the language? Here is my code of calendar and what i want to do. Thank you.
$('#calendar').fullCalendar({
//defaultView: 'week',
locale: "es",
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
//defaultDate: '2016-01-12',
editable: true,
eventLimit: true, // allow "more" link when too many events
selectable: true,
selectHelper: true,
minTime: "09:30:00",
maxTime: "19:30:00",
slotLabelFormat: "h:mm",
slotDuration: "00:30:00",
slotLabelInterval: "00:30:00",
//columnFormat: { month: "ddd", week: "ddd D", day: "dddd" },
select: function(start, end) {
With this code, i got this one now:
And if i delete the '//' of line of columnFormat, it's like:
Can someone help me? Thank you.
回答1:
Use full calendar View-Specific Options
views: {
month: {
columnFormat: 'dddd' // set format for month here
},
week: {
columnFormat: 'ddd d/M' // set format for week here
},
day: {
columnFormat: 'dddd' // set format for day here
}
},
remove columnFormat
from your code and set views
config.
回答2:
You can use this:
columnFormat: {
month: "ddd",
week: "ddd dd",
day: "dddd"
}
来源:https://stackoverflow.com/questions/45505064/fullcalendar-format-of-title-of-weekview