Premium support for our pure JavaScript UI components


Post by swathi »

Hi,

Will render one year data in the scheduler by passing dates to startDate and endDate.
I want to center the view from current date to 3 days which is achieved through zoomToSpan

let startDate = new Date();
let endDate = new Date();
endDate.setDate(startDate.getDate() + 3);
this.schedulerPro.zoomToSpan({
      startDate: startDate,
      endDate: endDate
});

But after doing this, startDate and endDate is getting changed. I am not able to see one year data.


Post by tasnim »

Hi,

I see that it shows the startDate in the view. Would you mind sharing a video of reproduction with us?


Post by swathi »

Hi,

Please find the attached demo code.
On click of the zoomchange button at the top, you will notice the difference with startDate and endDate

Attachments
zoomspan.zip
(300.89 KiB) Downloaded 11 times

Post by ghulam.ghous »

Hi Swathi,

I think what you need is zoomKeepsOriginalTimespan, please set this config on the scheduler component to true: https://bryntum.com/products/schedulerpro/docs/api/Scheduler/view/mixin/TimelineZoomable#config-zoomKeepsOriginalTimespan


Post by swathi »

Hi Ghulam,

The above solution works. Thank you


Post Reply