Retrieve the date selected when creating an event


I have had to write a custom time to have input boxes for the time period. i have written these inputs, as well as including a drop down for the date selection as provided with the original time selection.

I want to set my date to the date of the event (date that was clicked on), the same as the original time functionality.

How do i get the date that was selected?

Thank you,

If you have defined custom control for the lightbox, check the ‘get_value’ method of the form element … ditor.html
It is called when user clicks ‘Save’ button of the lightbox.
Usually, this method should return a selected value of the control, and it will be assigned to the property of an event specified in config.map_to.
When control works with more than one property (like in your case - start/end_date), you can assign selected values directly to an event object. Event is passed as a second argument of get_value method get_value:function(node,ev){ ev.start_date = ...; ev.end_date = ...; return null; },


I have my custom time retrieving data on start up, and saving perfectly on a single event.

When saving a recurring event, I get the following error
Uncaught TypeError: Cannot read property ‘id’ of undefined dhtmlxscheduler.js:220
scheduler.formSection dhtmlxscheduler.js:220
scheduler.form_blocks.recurring.get_value dhtmlxscheduler_recurring.js:14
scheduler._lightbox_out dhtmlxscheduler.js:247
scheduler.save_lightbox dhtmlxscheduler.js:250

My thinking is that the id is getting lost on scheduler.attachEvent(“onEventSave”, function (id, data, flag)

I have used onBeforeEventChanged and onLightbox as well. As previously mentioned, all works perfectly on a single event. The problem comes in when the event is recurring.

Any idea where this id is getting lost?

Quite urgent, help would be appreciated.

Thank you,