Hayden Schiff
Hayden Schiff

Reputation: 3330

FullCalendar not loading from JSON except in Chrome

I am using FullCalendar to make a theater-rehearsal schedule, and decided JSON was the best way to pull events from my MySQL database. In the JavaScript for the calendar page, I'm doing:

$(document).ready(function() {
$('#calendar').fullCalendar({
events: '/eventsfeed.php',
[...]

And my JSON feed is returning this, with the header "Content-type: application/json":

[
    {
        "title" : "First Show",
        "start" : "2012-04-26 19:00:00 EST",
        "end" : "2012-04-26 21:00:00 EST",
        "allDay" : 0,
        "comments" : "Good show everyone!",
        "scenes" : "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50",
        "id" : "1",
        "location" : "place",
        "userid" : "1"
    },
    {
        "title" : "derp",
        "start" : "2012-01-21 13:59:59 EST",
        "end" : "2012-01-21 23:59:59 EST",
        "allDay" : 0,
        "comments" : "test event",
        "scenes" : "1,16,24",
        "id" : "2",
        "location" : "narnia",
        "userid" : "1"
    }
]

Now, this works just fine in Chrome, but none of my events show up in Firefox or Safari, and they used to show up when I was adding the events as a Javascript array. I tried declaring the JSON feed in a way where an alert() would be thrown if AJAX failed while retrieving the JSON feed, but it never did anything. I checked that Javascript is enabled in the browsers, and I tried changing the JSON feed's content-type to text/html and text/plain, but still had no luck. What am I missing here? Thanks!

Upvotes: 1

Views: 876

Answers (1)

Hayden Schiff
Hayden Schiff

Reputation: 3330

Ah, I found it, the EST in the dates was breaking everything. FullCalendar's documentation said that would be fine, but I guess it was wrong. (Originally posted this as a comment on 2012/01/26)

Upvotes: 1

Related Questions