additional event parameters not there when creating new evt

Hi,
I have several additional parameters (in addition to start, end, etc) for events I wish to display.

For the events loaded via xml from the data base everything is fine and I have the extra parameters appearing in the lightbox as required. Also if I use a debugger I can see these extra parameters in the javascript event object.

However, if I try to create an event by clicking and dragging on, say, the day view then the event object that is created does not have these extra parameters. It only has the standard parameters.

What do I need to do to get these extra paramaters to be part of the event object as is the case with the already loaded events?

You can use onEventCreated handler, to set defaults for the newly created event

[code]scheduler.attachEvent(“onEventCreated”, function(id){
var ev = scheduler.getEvent(id);
ev.some_property = “value1”;
ev.other_property = “value2”;

return true;

})
[/code]

Thanks stanislav,
That worked. :smiley:

I was using the event_object from
scheduler.attachEvent(“onEventCreated”, function(event_id,event_object)
but that didn’t work. :question:

Second param is the DOM event object ( onclick or onmouseup event which was producing the new event )