search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Gantt: Add "padding" days

Asked by Leo
1 month ago.

Hi there,

By default, and unless otherwise specified, the DayPilot.Gantt renders a timeframe from the first to the last item.

Other than manually calculating and setting a start date (DayPilot.Gantt.startDate) as well as a duration (DayPilot.Gantt.days), would it be possible to have an option to add a number of “padding” days? E.g. start the duration always 5 days before and make the chart 5 days longer than the last element?

Currently, we load everything, trigger an update, then calculate new start and end using visibleStart() and visibleEnd(), and the trigger an additional update. If the user is scrolled to the end of the Gantt chart, this sometimes makes them jump towards the middle, as the first update() has a shorter time range…

Thanks!
Leo

Answer posted by Dan Letecky [DayPilot]
1 month ago.

Hi Leo,

It’s now available as paddingDays in the latest sandbox build (2026.1.6886);

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.