My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 678: Method to remove all event sources
15 people starred this issue and may be notified of changes. Back to list
Status:  ExportedToGithub
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by vneh...@gmail.com, Oct 19, 2010
I would like to have a simple public method that knows how to call removeEventSource on each of the objects in the eventSources array.

This allows me to make a simple call and clean up the calendar in preparation for a new set of event sources.

Also it would be great to set an array of event sources after the calendar has been inited, rather than adding srcs in a loop.

thx
Oct 20, 2010
#1 vneh...@gmail.com
issue subject should read

convience function to remove all event sources
Nov 21, 2010
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: convience function to remove all event sources
Status: Maybe
Dec 29, 2010
#3 lucas.ve...@gmail.com
Hi, I've found a small fix for this:

Inside the EventManager I've added:

t.removeEventSources = removeEventSources;

and then

function removeEventSources() {
 sources = [];

 // remove all client events from all sources
 cache = [];

 reportEvents(cache);
}

I'm then using:

$('#calendar').fullCalendar('removeEvents').fullCalendar('removeEventSources').fullCalendar('addEventSource', newURL);

I only need 1 source at a time.
Jan 13, 2011
#4 i...@erikbaan.nl
Solution by lucas velasco works perfect for me.

Another great addition for me would be to apply/change GET parameters for current event source(s), something like .fullCalendar('refetchEvents', 'user=new_user_id')
Feb 2, 2012
#5 tsomik1
How would I make the same change in minified version of the fullcalendar
Feb 10, 2012
#6 gugli...@gmail.com
it works I use it like this:

$('#calendar').fullCalendar('removeEventSources');  

Thanks! 
Mar 21, 2012
#7 adr...@barebones.ca
So, if I understand, you have changed your own version of FullCalendar source? The "official" code does not have this feature?

If I am correct, then it sure would be nice to see this function added to the "official" code
Mar 22, 2012
#8 gugli...@gmail.com
yeap! It will be great if we can add this in the official code!
Apr 14, 2012
#9 samue...@gmail.com
I would like this feature too, especially the one in Comment 4, to change parameters for event source since I'd like to render just one calendar that changes events dynamically
Jul 16, 2012
#10 pulsar1...@gmail.com
Great! it works! thank you!
Jul 27, 2012
#11 smida.mi...@gmail.com
Works great, thank you
Sep 19, 2012
#12 luisedua...@gmail.com
Thanks !!! This is what i needed!
Jun 19, 2013
#13 DJDataB@gmail.com
I was thinking about a line like 
<div class='external-event'>I don't work that day<div class="remove-item">[X]</div></div>

from full source
<div id='external-events'>
        <h4>Draggable Events</h4>
        <div class='external-event'>Event1 <div class="remove-item">[X]</div></div>
        <div class='external-event'>Event2</div>
        <div class='external-event'>Event3</div>
        <p>
            <input type='checkbox' id='drop-remove' /> <label for='drop-remove'>remove after drop</label>
        </p>
    </div>
Aug 13, 2013
Project Member #14 adamrs...@gmail.com
(No comment was entered for this change.)
Summary: Method to remove all event sources (was: convience function to remove all event sources)
Status: Accepted
Labels: -Type-Enhancement Type-Feature
Aug 15, 2013
Project Member #15 adamrs...@gmail.com
 Issue 1389  has been merged into this issue.
Dec 31, 2014
#16 flmi...@gmail.com
It really does not make sense to change the code itself. After all this time was has it not been implemented into the original source code?  Or has it?
May 13, 2015
#18 casan...@gmail.com
Works Perfectly, thanks.
Aug 21, 2015
Project Member #19 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/948

This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event.

Happy coding,
Adam
Status: ExportedToGithub
Sign in to add a comment

Powered by Google Project Hosting