| Issue 658: | 'removeEvents' does not work | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Hi, Thanks for this great plugin again. .fullCalendar( 'removeEvents' [, idOrFilter ] ) does not work.You can reproduce this by running js console on: http://arshaw.com/js/fullcalendar/examples/json.html run this to see the events > $('#calendar').fullCalendar( 'clientEvents'); remove one of the events: > $('#calendar').fullCalendar( 'removeEvents', [{id:111}] ); run the rerenderEvents just in case: >$('#calendar').fullCalendar( 'rerenderEvents' ); It still stays there PS: In my working environment, I suprisely can remove the event I added, but i had to run both 'refetchEvents' (since I remove from the DB too) then 'rerenderEvents'.
Oct 7, 2010
Thanks for the quick answer. So how does the filter work? Does the fullcalendar understand its an id or a filter on another variable (like title etc.)?
Oct 10, 2010
if a string/number is passed in, it is assumed to be an ID. if a function passed in, it is assumed to be a filter function. the filter function operates just like jquery's grep... http://api.jquery.com/jQuery.grep/ |
|
| ► Sign in to add a comment |
this is because, if you want to remove an event by an id, you need to do this... $('#calendar').fullCalendar( 'removeEvents', 111 );