Blocked timespan in Year View - how to open the lightbox?

Hi there,

As soon as I add a blocked timespan using addMarkedTimespan I cannot open the lightbox in the Year View anymore. Example: http://snippet.dhtmlx.com/5/02c84dc73 (double click a day/date)

I assume it checks for collisions in the whole 24-hr range.

It would be nice if there was an option for collision checking on save instead of on create. (similarly to how it works in other views when you change the start/end date event and it stretches over a blocked timespan - the lightbox doesn’t close and it doesn’t save the event)

I have not checked the code this time, is there some config/easy override? Thank you.

Hi @fxfn,

Basically, the addMarkedTimespan isn’t designed for the year view and current behavior is quite expected.
The first step is to not use the dhx_time_block of the marked timespan, so the events created won’t be blocked. After that, you should apply custom logic from the onEventSave event:
https://docs.dhtmlx.com/scheduler/api__scheduler_oneventsave_event.html
and return false, if the event time lays in the forbidden range.