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}Supported Constraint Types
Section titled “Supported Constraint Types”| Constraint | MSP equivalent | Behavior |
|---|---|---|
start-no-earlier-than | SNET | Start on or after the constraint date. |
start-no-later-than | SNLT | Start on or before the constraint date. |
finish-no-earlier-than | FNET | Finish on or after the constraint date. |
finish-no-later-than | FNLT | Finish on or before the constraint date. |
must-start-on | MSO | Start exactly on the constraint date. |
must-finish-on | MFO | Finish exactly on the constraint date. |
Soft vs. Hard Constraints
Section titled “Soft vs. Hard Constraints”Soft Constraints (SNET, SNLT, FNET, FNLT)
Section titled “Soft Constraints (SNET, SNLT, FNET, FNLT)”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-conflictif the dependency and constraint windows do not overlap.
Hard Constraints (MSO, MFO)
Section titled “Hard Constraints (MSO, MFO)”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-conflictordependency-constraint-conflict. - The task date is NOT moved to satisfy the dependency; the constraint wins.