Reliable way to forbid start date modification through UI ?

Hello.
I’m trying to find a reliable way to forbid only start date modification through UI.
Here my code:

gantt.attachEvent('onBeforeTaskDrag',function(id,mode,e){
    var result = true;
    if(e.srcElement.className.indexOf('task_left') > - 1 ) {
        result = false;
    }
    return result;
});

But with some mouse positions on the tasks left side, i can drag start date. For those cases, e.srcElement.className contains either :

  • gantt_task_content
  • gantt_task_line ganttTask ganttDesign gantt_selected

Is there another way to forbid drag of task’s start date ?

Thanks

Hi,
UI uses css class of event target in order to detect the resize handles. So the easiest way to prevent resizing is to hide the left resize handle via CSS:.gantt_task_drag.task_left { display:none !important; }

Thanks a lot.
It’s perfect.

Regards,

Laurent BIZE