1
votes

I have this date settings for the event start in fullCalendar: month/day/year, for example '02/25/2012'. But i want this format day/month/year, how can i do?

I've tried using this expression $.fullCalendar.formatDate( date,'dd/MM/yyyy');

But when i insert the date in that format my calendar load the events in wrong dates. For example an event who should start on 29th February, is loaded on 1st February.

Why?

2

2 Answers

1
votes

formatDate is used to convert a Date to string. It seems you want to do the reverse - parse the String into a Date. There is a fullcalendar parseDate, but that only works with ISO8601 format, IETF format, or a UNIX timestamp.

See here for help with converting your date format.

0
votes

Use this:

$.fullCalendar.formatDate( date, formatString [, options ] );

See the specs here: http://arshaw.com/fullcalendar/docs/utilities/formatDate/