The tasks.businessEnd() returns the adjusted end date of a task:
Starts with the task’s current start date and its business-only duration.
Scans the resulting date range for any cells marked non-business (weekends, holidays, etc.).
Shifts the end date forward by the length of every non-business interval it encounters, so that the total business duration is preserved.
Returns the final end date that now fully covers the original business duration plus any skipped non-business time.
The non-business cells can be defined using the onBeforeCellRender event handler.
Available since 2025.3.6564.
DayPilot.Gantt.tasks.businesssEnd(task, duration);
task
(DayPilot.Task) - the task for which the business end is calculated (only the start value is used)
duration
(DayPilot.Duration) - the business-only duration
DayPilot.Date object
or null
if the specified tasks doesn’t belong to the Gantt chart component