onClick & onDragEnd events fires at the same time

I have a scheduler where I have disabled the default popup. I have the drag events enabled and have a custom popup to add an event. I have another custom popup for edit event too, that appears when clicked on an event. The problem I face now is when I click on an event, 2 popups appear. The edit popup and the add popup. But in my code I have the add popups code inside the ‘onDragEnd’ event and edit popup inside the ‘onClick’ event. Then how does it get fired onClick?


As I understand, you don’t use built-in lightbox popup and create new own popup.
By default Scheduler has functionality, events, etc. for correct work with Lightbox. There is way to create fully custom lightbox:
docs.dhtmlx.com/scheduler/custom … _form.html

In case when you want to open 2 popups, you can implement it by onBeforeLightbox event. Please, check the sample how to achieve it
docs.dhtmlx.com/scheduler/sample … tions.html

As for onClick and onDragEnd events: perhaps you may need to add some check using setTimeout and disable one of these events.

Actually I have to use a custom popup and not lightbox. For time being I have changed the single click to double click to solve that issue. But now I don’t have any option to create an event by double-clicking a cell. The cellDblClick event doesn’t get fired as it works only in the timeline. Is there any other option to create an event on double click of a cell?


onEmptyClick event fires when user clicks on an empty space in the scheduler, but it triggers by a single click.

You can try js event ondblclick.