I need to work with a “day” scale, but with “hours” duration. My days have 8 hours.
When I try to move a task inside the same day cell it automatically shrinks the task, if I move it again it is resized again.
Try moving the Task 1 a little bit to the right in the same day as it is in the sample bellow:
Is there any way to prevent such task resizing?
It happens because of the “work_time” option. When it is enabled, gantt doesn’t count the duration of non-working hours leading to stretching or shrinking the tasks. The problem can be solved in two ways.
Turn off the “work_time” option. Tasks won’t be stretched or shrunk, but gantt won’t calculate the working time:
Another way is to hide non-working time using “skip_off_time” option. That will change the appearance of the timeline. To make it look like in your snippet you can add an additional scale and use css to hide it: