Single click instead of double click behavior

Right now, to create a new event you need to double-click on the corresponding time. To edit a current event, you need to double-click on the event entry in the calendar.
Is it possible to completely change this to be events that are triggered by a single-click?

Can you completely switch double-click behavior to single-click behavior?

Thank you very much! :open_mouth:

You may try the following:

scheduler.attachEvent(“onClick”,function(event_id,e){
scheduler._on_dbl_click(e||event);
return false;
})

It will enable existing event editing on single click.
In addition we need to enable new event creation with single click on an empty space.

Thanks!!!

In addition we need to enable new event creation with single click on an empty space.

Scheduler doesn’t provide such a built-in functionality. It’s necessary to modify the dhtmlxscheduler.js. If you need, we can provide information about necessary modifications.

Thanks!

I’m trying to make it work this way:

scheduler.attachEvent("onClick", function(id, e) {
    scheduler._on_dbl_click(e);
    return false;
});

function init() {

    var setter = scheduler._click.dhx_cal_data;

    scheduler._click.dhx_cal_data = function(e) {

        if (!scheduler._locate_event(e ? e.target : event.srcElement)) {
            scheduler._on_dbl_click(e || event);
        }
        setter.apply(this, arguments);
    };

   ......
   ......
   ......

}

is it correct way?

Yes, this way is correct.

Cool!

Thank you very much!!!

:smiley:

Hello, i have a problem with this. When i enable single click edit with the below code

scheduler.attachEvent("onClick",function(event_id,e){ scheduler._on_dbl_click(e||event); return false; })

and double click on an existing event, if i then press the cancel button the event is deleted. I also noticed that when i double click on scheduler events, multiple native events are fired
(2 single clicks, and 1 double). I think that this causing the problem. Can you suggest any workaround here?

Hi
I can reproduce your problem but I can’t see any solution. Did you find a solution ?
Cheers
greg