Issue 2403: Additional helper syntax for 'updateEvent'
Status:  ExportedToGithub
Owner: ----
Closed:  Aug 2015
Reported by moni...@gmail.com, Dec 30, 2014
.fullCalendar('updateEvent', id);

Please provide a helper syntax for 'updateEvent'.
As docs have it, the parameter must be a true event (not merely a reconstructed object). A true event may be obtained by clientEvents method. The client method accepts event id (as well as filtering function).

Considering above, I would see it a great shortcut and a coding helper, to be able to provide event id to updateEvent, such as after receiving an ajax response.

Regards,
Artur


Jan 6, 2015
Project Member #1 adamrs...@gmail.com
updateEvent is only useful after programmatically modifying an Event Object that has been obtained via one of FC's event hooks or through the clientEvents method. So, if you are using updateEvent, you would have needed a reference to a real Event Object at some point anyway. What you describe would only be useful if it were possible do change an event's fields without actually getting a reference to the Event Object, which is currently impossible. What do you mean by "after receiving an ajax response"? How are you modifying the event's fields?
Status: Discussing
Labels: Type-Feature
Jan 6, 2015
#2 moni...@gmail.com
By no means consider me an expert at this point :) 
I'm getting a ref to an event from `eventClick(event, jsEvent, view)` handler, which has a valid event ref. Then I open a modal and let user update the event's fields.
However, before modal is dismissed, ajax-based validation has to take place. Once the backend has responded "OK", I then modify the `event` properties directly, taken from the form fields.
Jan 6, 2015
Project Member #3 adamrs...@gmail.com
In the step where you say you modify the `event` properties directly, assuming that is in the JS, what do you mean? Are you getting ahold of the Event Object somehow and modifying its fields? doing it through clientEvents method?

My point is that the `updateEvent` is so reliant upon modifying and keeping a reference to an original Event Object, it seems like a mistake to hide it through a shortcut like what you propose. It might give developers the wrong idea on how to use it.
Jan 6, 2015
#4 moni...@gmail.com
OK, then
Let's stick with the following method: http://jsfiddle.net/ht3mjcmm/
Please, disregard this issue.
Aug 21, 2015
Project Member #5 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/2668

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