Our pure JavaScript Scheduler component


Post by oriswid »

Hello.

Is there a way to get the start and end date of the current view?

to be precise, I need the start and end dates in the current view that are visible to the user, not the entire view range. (similar to scheduleRange: 'currentview' in the export method)


Post by marcio »

Hey oriswid,

You can access that information by checking scheduler.startDate and scheduler.endDate.

Best regards,
Márcio


Post by oriswid »

Thank you Marcio.

Unfortunately, this is not working for me.
The code you provided returns the range of the entire view and not just what the user can see.

As you can see in the attached screenshots, the range visible to the user is 05/06 - 17/06.
The props hold the dates 22/05 - 04/09 which is the entire range if the user scroll the view from left to right.

Attachments
scheduler range.png
scheduler range.png (75.18 KiB) Viewed 108 times
popuprange.png
popuprange.png (20.12 KiB) Viewed 108 times

Post by marcio »

Hey oriswid,

Oh, I didn't know you're using the infiniteScroll, in that case (you can see that mentioned in the documentation) you can use the following property https://bryntum.com/products/scheduler/docs/api/Scheduler/view/TimelineBase#property-visibleDateRange

scheduler.visibleDateRange

You can check that working here https://bryntum.com/products/scheduler/examples/infinite-scroll/

Best regards,
Márcio


Post by oriswid »

Thank You Márcio

this is exactly what I needed!!


Post Reply