I am trying to make the date format of FullCalendar dd/mm. How can I do this? I found [this][1] method, but I am not really sure how to edit it in my case. I am trying to make it so that in the dayView, the header shows the date in dd/mm format, rather than the current mm/dd American format.
Is it possible to do this?
I am trying to make the date format of FullCalendar dd/mm. How can I do this? I found [this][1] method, but I am not really sure how to edit it in my case. I am trying to make it so that in the dayView, the header shows the date in dd/mm format, rather than the current mm/dd American format.
Is it possible to do this?
Share Improve this question asked Feb 28, 2012 at 23:31 Simon KielySimon Kiely 6,04029 gold badges100 silver badges191 bronze badges 1- 1 your link didn't work... – Sinetheta Commented Feb 29, 2012 at 3:19
4 Answers
Reset to default 6Sure, you can play with the titleFormat
jsFiddle
$('#calendar').fullCalendar({
titleFormat: {
month: 'MMMM yyyy',
week: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}",
day: 'MM/dd'
},
As I have written elsewhere on SO you can use this undocumented config variable to make a general change for all appearances of date/month so you don't have to specify it per view:
dayOfMonthFormat: 'ddd DD/MM',
Check out this link
http://arshaw.com/fullcalendar/docs/text/titleFormat/
You can specify which view you want to edit through this (in your case the day view)
http://arshaw.com/fullcalendar/docs/views/View_Option_Hash/
So you would probably have something along the lines of
titleFormat: {
day: 'dddd, d MMM, yyyy' //whatever date format you want here
}
Fullcalender has a few utilities functions you can use. You can get at these after the calender has been loaded through the $.fullCalendar.formatDate(, 'dd/mm'). There are also a few others that are work a look.. http://arshaw.com/fullcalendar/docs/utilities/