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

Width calculation in custom HTML, for trimmed events

Asked by Olivier Rossel
3 years ago.

Hello.
I have discovered that events trimmed by the scheduler borders are displayed as two consecutive divs:

1:
<div unselectable="on" class="scheduler_default_event_inner" style="background: rgb(105, 157, 76);">
</div>
2:
<div unselectable="on" class="scheduler_default_event_float" style="position: absolute; inset: 0px 0px 0px 124.444px; overflow: hidden;">
<div class="scheduler_default_event_float_inner" unselectable="on">
/* custom HTML goes here */
</div>
</div>

The custom HTML you set in a onBeforeEventRender will go as indicated in the comment above.
My problem is that the size of the surrounding div of that custom HTML (i.e div 2) corresponds only to the visible part of the event, whereas the div number 1 is the one that has the full size and location.

Is there a way to have my custom HTML injected in the div 1 instead of the div 2 ?

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

You can turn off the "floating events" feature using floatingEvents property:
https://doc.daypilot.org/scheduler/floating-events/

When floating events are disabled, only the div #1 will be displayed.

Answer posted by Olivier Rossel
3 years ago.

It works. Thanks!

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