Premium support for our pure JavaScript UI components
Hello,
I have a question about validating a drag drop operation:
Is it somehow possible to prevent dragging a task based on the date condition? For instance, I would like to block dragging the tasks into the past dates.
I've tried out the examples from this documentation:
https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskDrag#validating-a-drag-drop-operation. But it allows users to drag and drop the tasks into the past dates and then the app moves the tasks to the initial place.
Hey dmitrypromx,
Thanks for reaching out.
So, if I understood correctly, the validation is working correctly, but you're looking not to have the animation dropping back to its initial place?
Hello Marcio,
Yes, I would like to know if it is somehow possible to stop dragging animation of a task based on the date condition. I mean before a user releases the mouse button. For instance, the following use case: a user can drag the task to the right (future dates) but can't drag it to the left (past dates).
Yes, exactly. Is it possible to implement similar behavior for the Gantt tasks?
Yes, it works. Thank you!
Hello,
Is it somehow possible to set the start and end dates constraints separately for start date of the task and end date of the task?
For instance, we have a task from November, 1 to November, 20. And we want to prevent shrinking or moving this task before November, 10. I think we could set the end date constraint just for the end date in this case.
Hi Alex,
I've checed the docs but didn't find an answer on my question there. Could you please tell me what values we should specify in this constraint object in our case? What should be in the "start" and "end" dates properties?