My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2272: easily add an event (via renderEvent) to a specific event source
1 person 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 julien.o...@gmail.com, Sep 1, 2014
Hi everyone !
First I would like to thank all of you for this amazing plugin !
I am facing the following issue :
I would like to dynamically add an event to a source, and I am wondering if it is even possible.

Let us take the following example :
http://jsfiddle.net/88562sxa/
I have a source : v with one event inside.
I also have an event ev. Its source references v.
When I add the event source to the calendar, everything is fine.
However, when I want to render the ev event, it does not appear on the calendar. The source v -even when referenced in source attribute of ev- does not change at all.
Is it normal ?
Is there an other way to dynamically add an event to a source ?

Thanks in advance !
Regards,
Julien Orain





Sep 2, 2014
Project Member #1 adamrs...@gmail.com
this functionality is better achieved with an event source *as a function* or *as a JSON feed*
http://arshaw.com/fullcalendar/docs/event_data/events_function/
http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/

but if you need to keep it in an array, you can use update your array, and use removeEventSource followed be re-adding it via addEventSource
http://arshaw.com/fullcalendar/docs/event_data/removeEventSource/
http://arshaw.com/fullcalendar/docs/event_data/addEventSource/

But there maybe should be a more convenient way. Especially if you want to dynamically add an event (via the renderEvent method) and want it to be associated with a specific Event Source Object because you want to leverage some of the Event Source Object Properties, like colors and such.
Summary: easily add an event (via renderEvent) to a specific event source (was: Adding events to a source dynamically)
Status: Accepted
Labels: Type-Feature
Sep 3, 2014
#2 julien.o...@gmail.com
Hi Adam !
So I used add/remove source to re add sources and everything is fine now ! Yeah, maybe a more convenient way could be found.
Thanks for the tip ;-)
Julien
Aug 21, 2015
Project Member #3 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/2537

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