Skip to content

Task Constraints

Source code
import { GANTT_CONSTRAINTS_DEADLINES_DEMO } from './gantt-advanced-data';
import { loadAdvancedGanttDemo } from './GanttAdvancedVanillaDemo';
export function load(parentSelector: string) {
return loadAdvancedGanttDemo(
parentSelector,
GANTT_CONSTRAINTS_DEADLINES_DEMO,
);
}

Constraints are explicit fields on a task that override or refine the automatic forward-pass scheduling:

{
id: 'integration',
name: 'External Integration',
constraintType: 'start-no-earlier-than',
constraintDate: '2026-05-04',
// other task fields
}
ConstraintMSP equivalentBehavior
start-no-earlier-thanSNETStart on or after the constraint date.
start-no-later-thanSNLTStart on or before the constraint date.
finish-no-earlier-thanFNETFinish on or after the constraint date.
finish-no-later-thanFNLTFinish on or before the constraint date.
must-start-onMSOStart exactly on the constraint date.
must-finish-onMFOFinish exactly on the constraint date.

These constraints define a legal window for the task. If the dependency propagation moves the task outside this window, the scheduler will:

  • Adjust the date to the nearest legal bound (if possible).
  • Report a constraint-window-conflict if the dependency and constraint windows do not overlap.

Hard constraints are authoritative. They pin the task to an exact date, even if it violates dependencies.

  • If a dependency requires a different date, the scheduler reports a hard-constraint-conflict or dependency-constraint-conflict.
  • The task date is NOT moved to satisfy the dependency; the constraint wins.