Reputation: 2573
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?
Upvotes: 1
Views: 3867
Reputation: 4572
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.
Upvotes: 1
Reputation: 24815
Use this:
$.fullCalendar.formatDate( date, formatString [, options ] );
See the specs here: http://arshaw.com/fullcalendar/docs/utilities/formatDate/
Upvotes: 0