Reputation: 351
¡Hey friends!, please I need you help me...The deleted events of fullCalendar.js appear again by pressing the button to change the month.
I have a problem with deleted events. I have this code:
$('#calendar').fullCalendar('removeEvents',event.id);
In this link you can see a gif about of I'm talking.
But when I press the button to change month the deleted events appear again. ¿Any idea?
Upvotes: 2
Views: 416
Reputation: 1216
You are loading your events from a json file and the deletion you are preforming is just removing it from the calendar view, not removing it from the json file. If you store your events in a database then you can use ajax to remove it from the database, then when you retrieve the events again it will not be there. The event will always be reloaded from the json file unless you edit that file.
Upvotes: 1
Reputation: 1
When you are changing the view, FullCalendar will load the events from what you have specified as the source. Depending on how you are loading the events, when you remove the event, the source events list will need to be updated as well, i.e. if it is from AJAX, you will need to send a request to your server to delete the events.
Upvotes: 0