onBeforeTaskAdd

fires before a new task is added to the Gantt chart

boolean onBeforeTaskAdd(string|number id,Task task);
idstring|numberthe task id
taskTaskthe task object
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Example

gantt.attachEvent("onBeforeTaskAdd", function(id,task){
    //any custom logic here
    return true;
});

Details

The event is blockable. Return false to cancel adding of the task.

See also
Back to top