adding event

how can i specify section id to the following code ,

scheduler.addEventNow(date,, event_step, "minute")); 

because i want to add an event dynamically to the units view , the above code doesn’t accept any section_id so the event is adding to the first section in the units view.

please suggest me any other alternate function that full fill my requirement .


The way you are calling addEventNow doesn’t appear to be correct, see the docs -

addEventNow just accepts an event object which is a standard js object with the properties scheduler requires e.g.

start_date: new Date(2013,0,10,8,30),
end_date: new Date(2013,0,10,10,30),
text: “Meeting”,
holder: “John”, //userdata
room: “5” //userdata
section_id: 1

Thank you smartfaceweb it worked :slight_smile:
i changed the code like this

scheduler.addEventNow({ start_date:date, end_date:, event_step, "minute"), section_id: glblCurrentSectionId });

and now its working fine , once again thanks a lot :slight_smile: