完整日历+通过嵌套JSON Feed访问日期

时间:2015-02-17 05:28:02

标签: javascript json fullcalendar

我正在尝试通过JSON Feed实现完整日历。我在从嵌套对象派生数据时遇到问题:

数据:

[{"id":22,"weeks":[{"title":"Testing New Filter","start":"2015-01-19","end":"2015-01-29","url":"http://localhost:3000/campaigns/testing-new-filter"},{"title":"Not this Feed","start":"2015-02-24","end":"2015-03-07","url":"http://localhost:3000/campaigns/not-this-feed"}]},{"id":23,"weeks":[]}]

日历实施:

$('#calendar').fullCalendar({
     eventSources: [

    // your event source
    {
        url: parser.pathname + '.json',
        error: function() {
            alert('there was an error while fetching events!');
        },
        color: 'yellow',   // a non-ajax option
        textColor: 'black' // a non-ajax option
    }

    // any other sources...

]   

    });

坚持我如何从“周”中获取数据' start是子元素

0 个答案:

没有答案