How the Constraint Works
When enabled, the Gantt chart enforces that every child task must stay within the date boundaries of its parent task. This applies to three editing interactions:- Drag — moving a child task bar left or right on the chart
- Resize — extending or shrinking a child task bar from either end
- Lightbox editing — changing dates or duration in the lightbox
Step 1: Enable Range Conflict Detection
Add the following to Widget Properties > Advanced > Gantt Config Script to enable conflict detection:| Property | Description |
|---|---|
enabled | Activates parent-child date range conflict detection |
checkStart | Validates that child start dates are not before the parent start |
checkEnd | Validates that child end dates are not after the parent end |
highlightChild | Highlights out-of-range child tasks with a visual warning style |
Step 2: Understand the Conflict Behavior
When range conflict detection is active, the Gantt provides several automatic behaviors: During drag operations:- Child tasks that are dragged outside the parent range are visually highlighted with a conflict indicator
- When you move the child back within range, the conflict indicator is removed automatically
- Parent tasks that have out-of-range children are also highlighted
- If you set a duration or date that places the task outside its parent’s bounds, an error message appears and the save button is disabled
- The error message identifies the parent’s date range so you can correct the values
- When a parent task is resized and its boundary moves inward, children that would fall outside the new range are automatically adjusted to stay within bounds
Step 3: Resolve Existing Conflicts
After enabling range conflict detection, the Gantt scans all tasks on load. Parent tasks with out-of-range children are highlighted immediately, so you can identify and fix scheduling inconsistencies in your existing data. The conflict tooltip on affected parent tasks displays a message indicating that children have a range conflict.Step 4: Combine with Drag Children Toggle
The Gantt toolbar includes a toggle for dragging children together with their parent. When this toggle is active and you move a parent task, all children move with it, maintaining their relative positions and avoiding range conflicts. Use this in combination with range conflict detection to ensure hierarchical consistency during bulk rescheduling.Verification
You should now see:- Child tasks blocked from being dragged past their parent’s start or end date
- A visual highlight on parent and child tasks when a range conflict exists
- Error messages in the lightbox when attempting to save dates outside the parent range
- Conflicts detected automatically when the Gantt chart loads
See Also
- Derive Parent Schedule from Children
- Configure Auto-Scheduling
- Configure Drag Children Behavior
- Use the Lightbox Inline Editor
Sources
Sources
KB ArticlesSupport TicketsSource Code
prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/config.jsprod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictDetector.jsprod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/ganttPreventMovingOutOfParent.cy.tsprod-gantt-src/com.nextedy.polarion.gantt.client/src/types/dateConflictDetector.d.tsprod-gantt-src/com.nextedy.polarion.gantt.client/src/types/gantt-extended.d.ts