custom_data parameter in addEventNow function

Hi,

I’m new to DHTMLX Scheduler.
We are currently running a trail version of the component to evaluate if it fits our needs.
I am doing some customization I have created a fully customized LightBox (by following the tutorial in the Docs) that I want to use when a new event is created or updated and also want to be able to create an event programatically from my client side code.

I’m using scheduler.addEventNow({ start_date: selectedDate, end_date: endDate, text: "Some Text", custom_data: "Some data" });

where selectedDate is being calculated based on the mouse position in the grid (great feature!) and the end date is simply 30 minutes later. I saw in the docs that there were another parameter called custom_data.
Now, my question is: What is the purpose of custom data and how do I use it?
The custom lightbox I am showing when I click the grid is a fairly complex form and it needs to display a lot of data.

What I am trying to do is as follows:
There are other controls on the same pages as the scheduler and some of those controls will need to be able to dynamically create a new event in the scheduler. Apart from the basic start_date, end_date and text properties I also need to pass a lot more data which needs to be displayed in the lightbox before the event is saved.
What would be the best approach to achieve this?
Any input on this matter is very much appreciated.

//Emret

Hello,

I saw in the docs that there were another parameter called custom_data.
Now, my question is: What is the purpose of custom data and how do I use it?
it’s just another property of the event object, e.g. if you have Event class like following

Event: id text start_date end_date location type_id
you can initialize all of its properties with addEvent or AddEventNow methods scheduler.addEventNow({ start_date: selectedDate, end_date: endDate, text: "Some Text", location:"some place", type_id:1 });

Great news! Thanks alot!