Our pure JavaScript Scheduler component


Post by srbadinas »

Hi everyone,

I have this use case about having events getting scheduled automatically just by setting a start date in the Scheduler Pro. So what I want to do is if I added an event that overlaps a current event on a day, that current event should be automatically scheduled on the next day.

I've attached an image and based on that, I've added an event called "New event" to Jack Rickhuss, so the scheduler should automatically move the orange event beneath it into the next day. How do I do that? is there a configuration for that?

Attachments
image.png
image.png (42.74 KiB) Viewed 118 times

Post by nickolay »

Hi,

There's no configuration option for this behavior, what you can do, is to add a dependency from "New event" to orange event. The orange event will then be started right after the "New event". Note though, that this will also move the "Answer Plan" event, since it has a dependency from orange event.


Post by srbadinas »

Hi nickolay,

Thank you for your response. Is there a way to automatically set the dependency?


Post by nickolay »

Yw.

Not out of the box, you can override https://bryntum.com/products/gantt/docs/api/Scheduler/view/SchedulerBase#function-onEventCreated method of the scheduler for that purpose. Then, in your code, you can analyze the event just added and add a dependency to/from it.


Post by srbadinas »

I see, can I ask if the engine is capable of handling my use case?


Post by nickolay »

Sure. Your use case is quite specific, and not related to the scheduling engine - you'll need to handle that dependency adding logic in your code.


Post by srbadinas »

Alright, thank you so much!


Post Reply