Reputation: 1903
I'm using fullCalendar and I've set the structure of visualization like this:
$('#calendar').fullCalendar({
'defaultView': 'agendaWeek',
'height': BackendCalendar.getCalendarHeight(),
'editable': true,
'firstDay': 1, //Lunedì
'slotMinutes': 30,
'snapMinutes': 15,
'axisFormat': 'HH:mm',
'timeFormat': 'HH:mm{ - HH:mm}',
'allDayText': EALang['all_day'],
'columnFormat':
{
'month': 'ddd',
'week': 'ddd d/M',
'day': 'dddd d/M'
},
'titleFormat':
{
'month': 'MMMM yyyy',
'week': "MMMM d[ yyyy]{ '—'[ MMM] d, yyyy}",
'day': 'dddd, MMMM d, yyyy'
},
'header': {
'left': 'prev,next today',
'center': 'title',
'right': 'agendaDay,agendaWeek,month'
},
the problem's that when I load the page the date on the header is displayed bad:
Display for month
Display for week
Display for day
What am I doing wrong? I'm using the version 2.3.1, in the past I'm using the vesion 1.6.1 'cause easyappointment library have an old version. Now I've update the version and all is broken, why? I need perphaps to update some file, method?
Upvotes: 0
Views: 345
Reputation: 11096
Must be capital Y
:
'month': 'MMMM YYYY',
look here: http://fullcalendar.io/docs/text/titleFormat/
The time formats are according to moment.js: http://www.momentjs.com
I have compiled a working fiddle here: http://jsfiddle.net/fq7zwjq0/
Major changes:
The string "MMMM d[ yyyy]{ '—'[ MMM] d, yyyy}",
is definetively disturbing moment and as the purpose isn't clear, I ave deleted the inner.
The language formatting can be easily set by 'lang': 'fr'
And make either everything uppercase or everything lowercase is way too simple, the placeholders are case sensitive tokens and mustbe set according to the moment.js documentation here: http://momentjs.com/docs/#/displaying/
Upvotes: 1