Skip to content

Task Constraints

Source code
TypeScript ts
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);
}
Vue vue
<template>
  <GanttAdvancedDemo :demo="GANTT_CONSTRAINTS_DEADLINES_DEMO" />
</template>

<script setup lang="ts">
import GanttAdvancedDemo from './GanttAdvancedDemo.vue';
import { GANTT_CONSTRAINTS_DEADLINES_DEMO } from './gantt-advanced-data';
</script>
React tsx
import React from 'react';
import GanttAdvancedDemo from './GanttAdvancedReactDemo';
import { GANTT_CONSTRAINTS_DEADLINES_DEMO } from './gantt-advanced-data';

export default function GanttConstraintsDeadlines() {
  return <GanttAdvancedDemo demo={GANTT_CONSTRAINTS_DEADLINES_DEMO} />;
}
Angular ts
import { Component, NO_ERRORS_SCHEMA, ViewEncapsulation } from '@angular/core';
import { RevoGrid } from '@revolist/angular-datagrid';
import { GanttAdvancedAngularBase } from './GanttAdvancedAngularBase';
import { GANTT_CONSTRAINTS_DEADLINES_DEMO } from './gantt-advanced-data';

@Component({
  selector: 'gantt-constraints-deadlines-grid',
  standalone: true,
  // Allows Angular demos to bind RevoGrid plugin props that are not wrapper inputs.
  schemas: [NO_ERRORS_SCHEMA],
  imports: [RevoGrid],
  template: `<revo-grid style="min-height: 560px" [theme]="theme" [hideAttribution]="true" [plugins]="plugins" [source]="tasks" [columns]="columns" [gantt]="ganttConfig" [ganttDependencies]="dependencies" [ganttCalendars]="calendars" [ganttResources]="resources" [ganttAssignments]="assignments"></revo-grid>`,
  encapsulation: ViewEncapsulation.None,
})
export class GanttConstraintsDeadlinesGridComponent extends GanttAdvancedAngularBase {
  protected readonly demo = 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.