Our state of the art Gantt chart


Post by abhilashlr »

As the subject mentions, I use React BryntumGantt component and use the following codebase to the taskDragFeature which has a validatorFn() which returns true always. I set a calendar (nonWorkingTime over the weekends) for the projectModel and try to drag a task to the weekend. My entire project model is manuallyScheduled: true. Despite all of this setting, the task can neither be dragged, nor does the afterTaskDrop's listener params of valid true (since validatorFn() returns true always).

    project: {
      ... // each task and its children are `manuallyScheduled: true`
    },
    taskDragFeature: {
      validatorFn: () => true,
    },

    listeners: {
      afterTaskDrop: ({
        valid,
      }) => {
        console.log(valid); // returns false on weekend drag and drop.
      },
    }

Post by alex.l »

Hi abhilashlr,

manuallyScheduled: true is not allows to drop tasks on non working time periods. And validatorFn is not override internal Gantt's validation.

If you want to only highlight nonWorkingTime that has been set in calendars, please use https://bryntum.com/docs/gantt/#Scheduler/feature/TimeRanges feature instead (example: https://bryntum.com/examples/scheduler/timeranges/) and setup calendar to have weekends as working period.

All the best,
Alex

All the best,
Alex


Post by abhilashlr »

Alright, thanks :) Please close this ticket.


Post Reply