How to make unit section clickable in unit view?


#1


Section clickable in unit view?
#2

Hi @sachin_Chaudhari

Please use the code below to catch a click on X axis:

scheduler.attachEvent("onSchedulerReady", function(){
  (scheduler.$container || scheduler._obj).addEventListener("click", function(e){
     if(scheduler.getState().mode == "unit" && e.target.closest(".dhx_scale_bar")){
        var action_data = scheduler.getActionData(e);
  		var clickedColumn = action_data.section;
        alert(clickedColumn);
     }
  });
});

Here you also can check the Snippet.

Please don’t create several same topics on forum in the future.

Regards


Section clickable in unit view?
#3

Thank you so much @Polina , It’s working for me.