Problem removing event sources from FullCalendar (jQuery)

后端 未结 2 2012
情书的邮戳
情书的邮戳 2021-01-18 19:58

Right then, I\'m using FullCalendar to display events from multiple sources, some local JSON feeds, others from Google Calendar. I\'ve implemented a feature whereby a single

相关标签:
2条回答
  • 2021-01-18 20:16

    You should rerender events after adding/removing a source, or maybe try to refetch events if that doesn't work. That might be the problem.

    0 讨论(0)
  • 2021-01-18 20:18

    Right then, I've actually found the solution to my problem, I decided to look back over the Google Project issues and noticed that someone had raised an issue for the same problem I was having, now the documentation says:

    Source must be a reference to the original Array/URL/Function. Events from the source will immediately be removed from the calendar.

    I thought this meant to remove a calendar I would have to use an identical source to the one I added, so if I added source /getEvents.php I would have to remove it in the same way, instead what it actually means is that I have to use the exact same source.

    So I set the source as an item in an array (calendar id as the key) and then I can add / remove the calendar based on this, this has now solved the problem.

    0 讨论(0)
提交回复
热议问题