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

Constrain Event moves in Scheduler to within Parent Resource?

Asked by Tony Dew
19 days ago.

I see that we can limit Event moves vertically or horizontally (https://doc.daypilot.org/scheduler/limit-event-moving/), but is there a way to limit moves only to within rows contained in the Parent Resource?

For instance, given:

Rooms:
|_ Ballroom
|_ Boardroom
|_ Bedroom
People:
|_ Jim
|_ Jenna
|_ Jerry

Can I limit an moving and Event booking a Person to just the Jim, Jenna or Jerry rows, and not allow that Event to be moved to schedule the Boardroom by mistake?

Answer posted by Tony Dew
19 days ago.

Oh, of course... after hours of searching docs, I find something mere seconds after asking. I'm assuming it will be handled in "Event Moving Customization" correct?

https://doc.daypilot.org/scheduler/event-moving-customization/

Comment posted by Dan Letecky [DayPilot]
18 days ago.

Yes, exactly - thanks for posting the solution.

The onEventMoving event handler lets you implement custom rules and forbid the target position by setting args.allowed = false.

This will add "scheduler_default_shadow_forbidden" class to the position indicator (which makes it red by default).

This is different from the vertical/horizontal moving restriction (https://doc.daypilot.org/scheduler/limit-event-moving/) or disabling parents (https://doc.daypilot.org/scheduler/parent-resources/) where it is not possible to move the indicator to the disabled locations at all.

The docs page you mentioned (https://doc.daypilot.org/scheduler/limit-event-moving/) is now updated to include links to other options.

New Reply
This reply is
Your name (optional):