Skip to main content

Default Behavior

By default, when you drag a task bar on the Gantt chart, the start and end dates snap to the nearest scale marks. The rounding unit depends on your current time scale:
ScaleRounding Unit
Day (D, DD)Full days
Week (W)Full weeks
Month (M)Full months
Year (Y)Full years
For example, if you set the scale to Month, dragging a task rounds its start date and duration to full months. This behavior simplifies scheduling at coarse granularity but prevents precise date placement when needed.

Disable Date Rounding

To disable rounding, add the following line to Widget Properties > Advanced > Gantt Config Script:
gantt.config.round_dnd_dates = false;
After this change, dragging task bars places them at the exact position where you drop them, without snapping to scale boundaries.
If you are using hour-precision scheduling with the scale set to hours (H), disabling date rounding lets you position tasks at specific times within the day rather than snapping to whole-hour boundaries.

When to Keep Rounding Enabled

Date rounding is useful in scenarios where approximate scheduling is sufficient:
  • Long-term portfolio planning at the month or year scale, where exact days do not matter
  • Sprint planning at the week scale, where tasks should align to sprint boundaries
  • Release planning where milestones align to month boundaries
The round_dnd_dates setting controls rounding for both drag (move) and resize operations. Setting it to false disables rounding for all drag-and-drop interactions.

Verification

You should now see:
  • Task bars placed at the exact drop position when dragged, without snapping to scale boundaries
  • Dates in the lightbox reflecting the precise position where the task was dropped
  • Resized task bars ending at the exact cursor position rather than the nearest scale mark

See Also

KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/dateConflictResolver.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/utils.js
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/gantt/model/Config.java
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/lib/lightbox/util.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/main.js