Our pure JavaScript Scheduler component


Post by bbarrette-msft »

Hi!

I'm currently trying to update the start and end date on the scheduler, based on a selection made outside of the scheduler itself. For example, using a date picker, I'll select a date and when on day view, I'll update the scheduler to have the start date at the selected date, and the end date 14 days later.

I've tried using the component reference to call setStartDate/setEndDate, also tried with setTimeSpan (with only the start date or with both dates), and the timeline I'm viewing stays on the dates it currently is.

I've checked the documentation to see if there was any guidance, also checked the forums, but wasn't able to find a concrete example. Am I missing something that should allow this to work?

Thanks in advance!
Bruno


Post by bbarrette-msft »

Also, something that we tried that was working, but that I don't feel lik it's the right solution, was to actually call the setStartDate function, and then the setEndDate one inside a setTimeout call to ensure we don't trigger the error about the end date being before the start date


Post by mats »

Can you please share the code you use? Try running this on the console here https://bryntum.com/products/scheduler/examples/basic/

and you'll see it working:

scheduler.setTimeSpan(new Date(2023, 5,1), new Date(2023, 5,7))

Post Reply