Adding a single date selector in the lightbox

Can I add a single date field selector inside a lightbox instead of start - end format. For instance if I have a date field called “payment date” inside the lightbox form as shown in the eg below.

Similarly I would also need to be able to add/remove many such date fields dynamically inside form. such as adding

payment 1 date
payment 2 date
payment 3 date

or removing them using +/- buttons

Any help would be appreciated.

Thanks :slight_smile: :slight_smile:

Hi,
time inputs of the scheduler are binded to the start/end_date properties of the event. So if you’ll be adding several such controls to the lightbox, you’ll have to do mapping manually. For example retrieve and assign these values using scheduler.formSection in onEventSave event:

docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … ction.html

Another option would be to implement a custom controls with the required behavior. Probably that would be easier than overriding the existing ones. You can create an input-control with the mini calendar binded to it. Then you’ll be able do define data mapping as it’s suitable for your application

docs.dhtmlx.com/scheduler/minicalendar.html
docs.dhtmlx.com/scheduler/custom … ditor.html

Regarding adding controls dinamically - there are couple of possible approaches to implement it (although all are not trivial, there is no quick answer). You can either redefine lightbox configuration on the fly and redraw the lightbox, or you can develop a control that would allow rendering multiple inputs and would be mapped to a several properties