| Issue 678: | Method to remove all event sources | |
| 15 people starred this issue and may be notified of changes. | Back to list |
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
Nov 21, 2010
(No comment was entered for this change.)
Summary:
convience function to remove all event sources
Status: Maybe
Dec 29, 2010
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
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
How would I make the same change in minified version of the fullcalendar
Feb 10, 2012
it works I use it like this:
$('#calendar').fullCalendar('removeEventSources');
Thanks!
Mar 21, 2012
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
yeap! It will be great if we can add this in the official code!
Apr 14, 2012
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
Great! it works! thank you!
Jul 27, 2012
Works great, thank you
Sep 19, 2012
Thanks !!! This is what i needed!
Jun 19, 2013
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
(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
Issue 1389 has been merged into this issue.
Dec 31, 2014
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
Works Perfectly, thanks.
Aug 21, 2015
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 |