Linked Questions

Popular Questions

Full Calendar: displaying start time

Asked by At

If I specify my events by hardcoding in a javascript events array, the time is displayed before the title on the calendar:

The Javascript code of:

events: [ { title : "my title", start : new Date(2010,9,8,11,12) } ]

results in a display of "11:12 my title" as an event on my calendar.

But, when I use an function to create the events (receiving the data via ajax), the time isn't displayed on the calendar. Here is the code for the ajax success function (in this example, I've hardcoded the start date, but it doesn't matter how I set the start date, it is never displayed, only the title is displayed):

        success: function(doc) {

            var events = [];

            $(doc).find('event').each(function() {
                    title: $(this).find('title').text(),
                    start: new Date(2010,9,8,11,12),
                    url:   $(this).find('url').text(),
                    className: $(this).find('className').text(),
                    allDay:    $(this).find('allDay').text()


It appears that the start date is handled differently thru the events function. I've tried using "new Date()" or specifying the date as a string (October 7 2010, 14:10) or as a unix time stamp. It appears to recognize the date because the event appears on the proper day of the calendar, but the time doesn't display when I am using the ajax function.

Any ideas?


Related Questions