Auto-scheduling automatically recalculates task start and end dates when a dependent task changes. Combined with a work calendar and project boundaries, it gives you a fully driven schedule without manual date adjustments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/svar-widgets/react-gantt/llms.txt
Use this file to discover all available pages before exploring further.
The schedule prop
Pass a schedule object to the <Gantt> component to enable scheduling logic.
| Value | Description |
|---|---|
{ type: 'forward' } | Default value. Tasks are laid out left-to-right but dates are not auto-driven. |
{ auto: true } | Enables full auto-scheduling: task dates cascade from projectStart through Finish-to-Start dependency chains. |
When
schedule={{ auto: true }} is active, moving a task or changing its duration will automatically push all downstream dependent tasks forward.Project boundaries: projectStart and projectEnd
Use projectStart and projectEnd to define the allowed date range for the scheduled project.
| Prop | Type | Description |
|---|---|---|
projectStart | Date | null | The earliest date tasks can be scheduled. Auto-scheduling anchors the first task here. |
projectEnd | Date | null | The latest date tasks should fall within. Used by critical path calculations. |
Work calendar: the calendar prop
The calendar prop accepts a Calendar instance (imported from @svar-ui/gantt-store) that defines working hours for each day of the week. When a calendar is provided:
- Task durations are counted in working days only.
- Weekend or non-working days are greyed out on the timeline.
- Auto-scheduling skips non-working days when calculating successor start dates.
Setting up a basic calendar
Adding custom rules
Usecalendar.addRule() to mark additional days as non-working (e.g. public holidays or company-wide off days). The callback receives a Date and should return 0 to mark the day as non-working.
Finish-to-Start dependencies
Auto-scheduling enforces Finish-to-Start (F2S) dependency links. When the source task’s end date changes, the target task’s start date is updated to the next working day after the source finishes. Links are defined in the standardlinks array using the 'e2s' (end-to-start) link type:
Unscheduled tasks: unscheduledTasks
Set unscheduledTasks={true} to allow tasks without assigned dates. Unscheduled tasks appear in the grid but are not rendered as bars on the timeline. Users can assign dates by dragging a task onto the chart.
start or end date:
Undo / redo: the undo prop
Set undo={true} to enable the full undo/redo history stack. Every task and link change is recorded and can be stepped through programmatically.
Triggering undo and redo
Use theapi.exec() method to trigger undo and redo actions:
Observing history state
Subscribe to the reactivehistory state to know when undo/redo actions are available: