Events not displayed in fullcalendar js

Calendar needs to be told to update after a data change. Try:

$("#calendar").fullCalendar('removeEvents');
$("#calendar").fullCalendar('addEventSource', nevent);
$("#calendar").fullCalendar('rerenderEvents');

when nevent is ready.

EDIT:

Accept the input as JSON object not a string:

nevent = $.parseJSON(document.getElementById('<%=hdnevent.ClientID%>').value);

Note that the JSON must be in correct format with quotes like:

[{ "id": "2302", "title": "XXX", "start": "4/4/2014 12:00:00 AM", "end": "4/4/2014 12:00:00 AM", "allDay": true, "url": "xxx"}]

in nevent value, start (and end) according to documentation should be: "you may specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"), a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX timestamp"

so you have to convert your dates.


I have tried this way in my calendar application.It seems your date format is wrong.It should be

[{ id: '2302', start: new Date(2014, 1, 3, 12, 0), end: new Date(2014, 4, 4, 12, 0) ,allDay: true, url: 'xxx'}]

Hope this helps.