Steve Robbins
Steve Robbins

Reputation: 13812

jQuery Fullcalendar not rendering events in IE7/8

I am using fullcalendar 1.5.1 and jQuery 1.6.2. Before, I was using jQuery 1.5 and nothing worked in IE7-9. Now IE9 works but 7 and 8 don't. The calendar renders itself but the events don't. They're not present anywhere in the html.

I'm using PHP to dynamically call my events from a MySQL table.

The output is as follows:

$(document).ready(function() {
    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        allDaySlot: false,
        eventClick: function(calEvent) {
            window.location = "ac_events.php?edit=" + calEvent.id;
        },
        events: [{
            id: 1,
            title: 'Dance Party',
            start: '2011-07-29 21:00',
            end: '2011-07-31 06:00',
            allDay: false},
        {
            id: 2,
            title: 'Meeting',
            start: '2011-07-28 09:00',
            end: '2011-07-28 18:00',
            allDay: false},
        {
            id: 3,
            title: 'Dinner with partners',
            start: '2011-07-28 19:00',
            end: '2011-07-28 21:00',
            allDay: false},
        {
            id: 4,
            title: 'Paroll Due',
            start: '2011-07-28 23:00',
            end: '2011-07-29 01:00',
            allDay: false}, ]
    });
});

Nothing I've tried can get this working. Anyone have a solution?

EDIT:

I get the following javascript error:

Message: 'undefined' is null or not an object
Line: 918
Char: 7
Code: 0
URI: http://[...]/javascript/fullcalendar.js

line 918:

function fetchEventSource(source, fetchID) {
    _fetchEventSource(source, function(events) {
        if (fetchID == currentFetchID) {
            if (events) {
                for (var i=0; i<events.length; i++) {
                    events[i].source = source;  // 918
                    normalizeEvent(events[i]);
                }
                cache = cache.concat(events);
            }
            pendingSourceCnt--;
            if (!pendingSourceCnt) {
                reportEvents(cache);
            }
        }
    });
}

Upvotes: 3

Views: 2661

Answers (1)

Shaded
Shaded

Reputation: 17836

You might try getting rid of the comma after the event for id 4. I know that rogue commas can break things.

Also, are you getting any js errors?

Upvotes: 4

Related Questions