I'm using fullCalendar in a web page, and I've implemented a lot of features on it. Now, I'm trying to delete all the events from a specific month, but something strange is happening.
The way I'm deleting my events is like this:
$(calendario).fullCalendar('removeEvents', function(evt){
var fechaEvt = new Date(evt.start);
return (fechaEvt.getMonth() === month &&
fechaEvt.getFullYear() === year &&
idsPunto.indexOf(evt.idPunto) !== -1 )
});
If I print $(calendario).fullCalendar('clientEvents') before and after the code shown before, it shows first an array with 11 elements, and then an empty array, so it seems that they are gone. Actually, you can see the calendar being empty for 0.5 seconds, but then, all the events are shown again.
The strange thing here is that, if I delete manually less than 11 events it works fine, but If I try to delete ALL my events, happends the thing I said before.
I've tried different algorithms (like deleting 1 by 1), but nothing works
Am I missing something?
Thanks!
Aucun commentaire:
Enregistrer un commentaire