FullCalendar未从JSON加载,Chrome除外

FullCalendar not loading from JSON except in Chrome

本文关键字:Chrome 除外 加载 未从 JSON FullCalendar      更新时间:2023-09-26

我正在使用FullCalendar制定剧院排练时间表,并决定JSON是从MySQL数据库中提取事件的最佳方式。在日历页面的JavaScript中,我正在做:

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

我的JSON提要返回了这个消息,标题是"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"
    }
]

现在,这在Chrome中运行得很好,但我的任何事件都不会显示在Firefox或Safari中,而且它们曾经在我将事件添加为Javascript数组时显示。如果AJAX在检索JSON提要时失败,我尝试用一种方法声明JSON提要,即抛出alert(),但它从来没有做任何事情。我检查了浏览器中是否启用了Javascript,并尝试将JSON提要的内容类型更改为text/html和text/plain,但仍然没有成功。我在这里错过了什么?谢谢

啊,我发现了,日期中的EST打破了一切。FullCalendar的文档中说可以,但我想这是错误的。(最初发布于2012/01/26作为评论)