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

Active drop-area in Calendar

Asked by Kim
2 years 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.


Answer posted by Dan Letecky [DayPilot]
2 years ago.

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

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:

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

Comment posted by Kim
2 years ago.

Thank you again, Dan.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.