I am using the FullCalendar script and I am having problems formatting the date / time of the EVENTS in the calendar.
I need all the date / time data to look like this:
2011-09-28 08:15:00
All dates are similar to this in my JSON source, which displays correctly on the calendar. However, if the event is moved or a new event is added (discarded by perpetual drag), the time format is as follows:
Fri 30.09.2011 14:30:00 GMT-0400 (EDT)
This is not DISPLAY in this format, but it appears this way when I try to insert event.start or event.end in my database or when I do this:
eventClick: function(event) { alert("Event ID: " + event.id + " Start Date: " + event.start + " End Date: " + event.end); }
I use this only to see how the date and time are stored in the calendar. I need to update my database with new events, but in the format shown above, but I am having problems with this.
How to use formatDate
function? I see him on the list, and the reason I'm asking for is because I donβt know what to do about it.
I did:
$.fullCalendar.formatDate(event.start, 'MM-dd-yyyy');
but it does nothing ...
Oseer source share