0

I am fetching events via JSON but Full Calendar is rendering them on the wrong dates.

JS:

events: function(start, end) {
        start = start.getFullYear() + '-' + (start.getMonth() + 1) + '-' + start.getDate()
        end = end.getFullYear() + '-' + (end.getMonth() + 1) + '-' + end.getDate()
        $.ajax({
            url: '/activity/calendar/user-feed/?start=' + start + '&end=' + end + '&activity_id=' + activity_id,
            dataType: 'json'
        });
    },

The ajax response is:

[{"start": "2013-05-24", "end": "2013-05-24", "title": "Avaliable"}, 
{"start": "2013-05-25", "end": "2013-05-25", "title": "Avaliable"}]

However Full Calendar displays the events on the 12th and 13th of April instead of the 24th and 25th May.

Please help, this makes no sense.

4

0 回答 0