My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 658: 'removeEvents' does not work
2 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Oct 2010


Sign in to add a comment
 
Reported by bugda...@gmail.com, Oct 6, 2010
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
Project Member #1 adamrs...@gmail.com
this is because, if you want to remove an event by an id, you need to do this...

$('#calendar').fullCalendar( 'removeEvents', 111 );
Status: Done
Oct 7, 2010
#2 bugda...@gmail.com
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
Project Member #3 adamrs...@gmail.com
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

Powered by Google Project Hosting