My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 216: removeEvents only removing events for current month
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Dec 2009


Sign in to add a comment
 
Reported by arjun...@gmail.com, Nov 29, 2009
when i run: 
$('#calender).fullCalendar('removeEvents');

its only removing events from the current month and not others.

Is there a way to remove all events or a group of events?  Could i have an
example of how to use the filter function. Is it?:

$('#calender).fullCalendar('removeEvents', function(calEvent) { return
calEvent.className == 'gpcss' });

The above is not working.

P.S. great plugin btw!
Dec 3, 2009
Project Member #1 adamrs...@gmail.com
if you are using plain array event source, all events should be removed with no
problems. however, i bet you are using a json event source or some other feed, and i
bet you are not telling your server/database about the deleted event. in this case,
the event is refetched every time a new month is visited. you need to immediately
delete it in your db so it is not transmitted back by the feed.

your above filter code looks good. it will delete all events with className 'gpcss'

let me know if my assumptions are wrong or if you are having any more problems. thanks
Dec 5, 2009
#2 arjun...@gmail.com
You were right.
Removing events from other months only works if you change the result of your json-
events.php

What I do now is update the sql search based on user options within json-events.php 
and then use the refetchEvents method.  
I also use this technique for adding and editing events i.e. update the database and 
then refetchEvents.
Seems to work quite well as I could never get the addEvent or removeEvent to work 
smoothly.

Thanks again for the great plugin.
Dec 20, 2009
Project Member #3 adamrs...@gmail.com
no problem, glad you got it to work.
Status: Done
Sign in to add a comment

Powered by Google Project Hosting