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

Best way to redraw scheduler after height change

Asked by Anonymous
3 years ago.

Hi,
I have the scheduler into an splitted view. When I resize the bottom part, I want the scheduler to take the whole space available. To achieve this I just call the method update().
I want to know if this is the correct way to do it. If not, is there another better way?
Thanks

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

If you use heightSpec: "Parent100Pct" the Scheduler will use the available space, i.e. 100% of the parent element. It requires that the parent element height is set properly (either using height or absolute position with top/bottom).

It also detects changes of the parent element and adjusts the height automatically.

In addition to that, you can request a manual height detection by calling show():
https://api.daypilot.org/daypilot-scheduler-show/

Another option is to set the height manually in pixels (it forces heightSpec: "Fixed"):
https://api.daypilot.org/daypilot-scheduler-setheight/

You can also use update(). The options listed above would be slightly more efficient but you don't have to be afraid of using update().

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