Hi,
I am trying to find the best way to commit any changes made to the event text field.
I am doing it as follows:
function updateText(event_object,serviceName,customer) {
if (event_object.text=="New event")
scheduler.setEventText(event_object.id,serviceName+": "+customer+".");
else
scheduler.setEventText(event_object.id,serviceName+": "+customer+". "+data.text) ;
scheduler.updateEvent(event_object.id); // render updated event
}
I’m calling this AFTER the initial event has been committed to the database, as otherwise I don’t have a valid event_id. When I try to use the autogenerated (timestamp like) initial event_id (before commit), the setEventText function appears not to work.
With the current code the correct text value is shown on the calendar. However, the DB value is not updated, so on refresh I see the old value.
Is it possible to handle this from the JS side (without updating the text on the lightbox before saving) or do I need to take care of this separately on the server side?
thanks,
Rose