Jquery Full Calendar json event source syntax

后端 未结 4 1370
栀梦
栀梦 2020-12-14 03:19

I\'m trying to use full calendar to load events from a json source. The json is from a URL like a feed, \"mysite.com/getEvents\" (which returns a json event object). Right n

4条回答
  •  再見小時候
    2020-12-14 04:21

    I know this is an old post but others may be looking for this...

    You need to have brackets around your json response, it seems to be expecting an array of objects:

    [
        {
            "title":"foo1",
            "id":"123",
            "start":"2016-02-12T10:30:00",
            "end":"2016-02-12T12:30:00"
        },
    
        {
            "title":"foo2",
            "id":"456",
            "start":"2016-02-14T10:30:00",
            "end":"2016-02-14T12:30:00"
        }
    ]
    

提交回复
热议问题