Disable cellclick event

I’m trying to disable the cell click event on empty cells in order to prevent creating new events
my code is simple .

scheduler.attachEvent(“onCellClick”, function (x_ind, y_ind, x_val, y_val, e) {

             return false; 

but for some reason it doesn’t seem to work , I already did the same for the events “onDblClick” and “onlClick” and they are working fine ,some other weird thing to mention is that while the browser console F12 is open the code above works juste fine .

Any help is appreciated


As I understand you, you have a page with Timeline, and you want to disable the event, which creates new tasks when you click on empty cells, am I right?

If I understand you correctly and you want to disable the creation of events, the easiest way to do it will be using ‘dblclick_create = false;’ in your code. Events can’t be created by one click, (by default, it happens only by double), and this method helps you to disable the possibility to create events by double click. After that, there will be no opportunity to create a task when you click on empty cells (but still you can edit your tasks, which were created before).
You can find the example here: http://snippet.dhtmlx.com/60025d6dd
There is more info about dblclick_create: https://docs.dhtmlx.com/scheduler/api__scheduler_dblclick_create_config.html

If the problem still exists, can you please repeat a part of your code, where you have Timeline and the problem on the snippet link, which I’ve written above?

That’s exactly what what I was looking for .thanks ,it’s working