Premium support for our pure JavaScript UI components


Post by henrikbackman »

Hi, what is the correct way of changing the visible date range using the umd script? It there a correct function to use? If so, could you write the answer here instead of linking to your documentation as it doesn't show the umd usage of the code.


Post by mats »

It's https://bryntum.com/docs/scheduler/#Scheduler/data/TimeAxis#function-setTimeSpan

You call it same way regardless of UMD or modules.

scheduler.setTimeSpan(date1, date2)

Post by henrikbackman »

Here's a screen shot of the date I'm trying to set and the error I get. It's the same error no matter what method I use to set the date.

Skärmavbild 2021-01-11 kl. 16.24.15.png
Skärmavbild 2021-01-11 kl. 16.24.15.png (155.6 KiB) Viewed 605 times

Post by mats »

We'll need a proper test case to see what's going on. You can test this easily in any of our examples.

Go to
https://www.bryntum.com/examples/scheduler/basic/

console:

scheduler.setTimeSpan(new Date(2020,0,11), new Date(2020,0,12))

Post by henrikbackman »

It turns out that setting autoAdjustTimeAxis to true did the trick.


Post Reply