how to update an event in fullCalendar?

后端 未结 2 1926
野趣味
野趣味 2021-02-09 04:14

I want to update my json in fullcalendar, Here is what I am exactly trying to do. I have a JSON string which I am directly trying to feed in to the event objects in the full ca

2条回答
  •  星月不相逢
    2021-02-09 04:56

    You need to add the following lines:

    $("#demo-calendar").fullCalendar('removeEvents'); 
    $("#demo-calendar").fullCalendar('addEventSource', JSON, true); 
    

    When adding new events to the calendar they can disappear when switching months. To solve this add stick: true to the event object being added to the scope.

提交回复
热议问题