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

Scheduler - How to get current cell width when cellWidthSpec is set to "Auto"

Asked by Anonymous
1 year ago.

When cellWidthSpec set to "Auto" is it possible to get the current value of cellWidth and how?

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

The calculated value is stored in cellWidth:
https://api.daypilot.org/daypilot-scheduler-cellwidth/

Comment posted by Anonymous
1 year ago.

OK, thank you. And which event should I listen too, when the cellWidth gets recalculated? is it onAfterRender, onAfterUpdate or something else?

I'm trying to implment the same zoom behaviour as show in this video: https://drive.google.com/file/d/1Qte8OxzD4LAP5OVAMVRff6aywz6D8jBj/view?usp=sharing

The current automatically calculated value of cellWidth is set as the minimum value of the slider

Comment posted by Dan Letecky [DayPilot]
1 year ago.

There is no special event for that (and onAfterRender/onAfterUpdate are not fired in this case) but you can use onBeforeTimeHeaderRender to check the cellWidth value. The time header will always get re-rendered after the cell width adjustment.

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