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

Active drop-area in Calendar

Asked by Kim
13 days ago.

Hi, Is it possible to set an area/time-span as the active drop-area, or alternatively, disable surrounding areas? I would like to only allow dropping events to specific days and times.

Thanks

Answer posted by Dan Letecky [DayPilot]
8 days ago.

You can use the real-time event handlers to check custom conditions:

https://api.daypilot.org/daypilot-scheduler-oneventmoving/
https://api.daypilot.org/daypilot-scheduler-oneventresizing/
https://api.daypilot.org/daypilot-scheduler-ontimerangeselecting/

You can forbid the current target by setting args.allowed = false. This will forbid the drop action and it will also provide a visual hint to the user by changing the shadow color (by applying a custom css class).

See also a couple of examples here:
https://doc.daypilot.org/scheduler/event-moving-customization/

In addition to the changed color, you can also provide custom text using args.right.html.

New Reply
This reply is
Your name (optional):