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

Ignoring left click behaviour for events

Asked by Vincent
2 months ago.

In some situations, we have events that are cancelled but that we would still like to display on the event scheduler, just so that users can see that someone had originally booked on a certain time frame and then cancelled. These "cancelled events" are only kept for display, and users are still allowed to create new events over their respective time-slots.

What I would like to know is if it would be possible to allow users to still maintain the grid behaviour for the duration of the event, as if it wasn't there(basically, be able to select a date range over-top of the cancelled event) but still be able to right-click the event(which currently would bring up a context menu that allows the user to "see cancellation details").

I can kind of achieve this behavior with "pointer-events: none" in css, but this also effectively removes the functionality of being able to "see cancellation details" entirely.

Is such a behavior possible with the scheduler?

Answer posted by Dan Letecky [DayPilot]
1 month ago.

There is an event that lets you override the standard mouse behavior but it works on the grid layer only (below events):
https://api.daypilot.org/daypilot-scheduler-ongridmousedown/

If these events are not bigger than a grid cell, you can add them as active areas using onBeforeCellRender:
https://api.daypilot.org/daypilot-scheduler-onbeforecellrender/

If the events span multiple cells, this approach might still work but with limitations (cell borders would be visible and the event would have to be composed of multiple active areas, one in each cell).

New Reply
This reply is
Your name (optional):