Custom form ignores start_date and end_date

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?

Problem confirmed, will be fixed in the next version, for now just add the one more line

saved._timed = scheduler.is_one_day_event(saved); //need to be added

scheduler.setEvent(this.currentObject.id, saved);

Brilliant! Worked a treat.

Thanks,