Is there a way to make an event unselectable?
Support Forum
Hey dcruz1990,
Yes, there is the https://bryntum.com/products/calendar/docs/api/Calendar/view/mixin/EventSelection#config-isEventSelectable configuration, you can check in the documentation for more info, like the example
isEventSelectable(event) {
return event.startDate >= Date.now();
}
Best regards,
Márcio
It's a bug that this is not called. https://github.com/bryntum/support/issues/6177
the EventSelection
mixin that Calendar uses extends the Scheduler's one. We reuse code for common purposes to keep APIs and the user experience the same as far as possible.
The new Scheduler()
is just for example. It could be new Calendar()
(But doesn't work right now)
Thanks @Animal for answering, found out that EventSelection mixin was removed from the docs. When using beforeEventSelectionChange
, i get access to something like this:
I don't know if this is part of the bug. Im using the listener this way:
, also tried to put another function and behave the same way, i still can select events.
However, if i put a debugger inside the function, it works fine and event doesn't get selected, i mean, tooltip isn't rendered.