Problem removing event sources from FullCalendar (jQuery)

青春壹個敷衍的年華 提交于 2019-12-01 17:56:01

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!