Hi all,
I’m using a completely custom form (ie overriding showLightbox), and am having a problem with inserting or updating an event based on the data that is returned from the server.
The server returns a JSON object like:
{"end_date":"2011-11-10
09:40:00","location":"Perth","start_date":"2011-11-10
07:10:00","text":"Test
event","attendees":{},"id":"161","
description":""}
which gets processed as follows:
// saved is the result from the server
// this.currentObject is the event object that is being edited or inserted
var formatter = scheduler.date.str_to_date(scheduler.config.xml_date);
saved.start_date = formatter(saved.start_date);
saved.end_date = formatter(saved.end_date);
scheduler.setEvent(this.currentObject.id, saved);
scheduler.changeEventId(this.currentObject.id, saved.id);
scheduler.updateEvent(saved.id);
After that, the item gets inserted into the scheduler correctly, but at the top, as if it is an all day event. If I inspect the this.currentObject object, the start_date and end_date are populated and correct.
Any ideas?