Our powerful JS Calendar component


Post by conn.finn »

Hello,

I'm running into a bit of an issue with the visibleStartTime setting, which seems to take a moment to apply when set to an hour later in the day. This is reproducible on the demo calendar https://www.bryntum.com/products/calendar/examples/basic/ but it's significantly more noticeable when Bryntum Calendar is in an LWC.
If you add

modes: {week: {hourHeight:70, visibleStartTime: 18, }}

to the demo calendar on browser, when the calendar loads, the top most hour mark shown is 12:00AM, and it takes a moment for the calendar to then scroll to 6:00PM. On the LWC demo calendar there is a much longer delay until the calendar scrolls to the specified visibleStartTime.

For the browser demo calendar, there is no delay if visibleStartTime < 10, but there is a delay if visibleStartTime >= 10.
For the LWC demo calendar, there is no delay if visibleStartTime <= 10, and there is a delay if visibleStartTime > 10.
This issue is still reproducible on Bryntum Calendar version 5.6.0
I attached screen recordings of the problem for the LWC demo calendar and for the browser demo calendar where I set visibleStartTime to 18.

Our goal is that we'd be able to open the calendar so that a particular event is in view and immediately interact with that event, but we're finding that when the visibleStartTime is greater than 10 there is a delay until the calendar actually scrolls to that time.

Please let me know if there is a way around this behavior or if we can try a different approach. Thank you

Attachments
Demo Calendar visibleStartTime delay.mov
(5.04 MiB) Downloaded 19 times
lwc delay when visibleStartTime greater than 11.mov
(1.61 MiB) Downloaded 17 times

Post by Animal »

The issue is that that all day view at the top animates to a height which encapsulates Math.min(this.defaultEventRowCount, this.maxEventCount)

So you will see in the example you linked to that at some unknown time when the data arrives from the server, the all day view expands over a certain time. And only then can we reliably scroll a start time to the top of the view.

Any time before that animated expansion in response to some data arriving at some time, and it can be scrolled to the incorrect position.

I can't really think of a way round this except for delaying the application of the setting.


Post by alex.l »

Hi,

I've opened a ticket for this issue here https://github.com/bryntum/support/issues/7954
Now, the delay you see is also caused by the time that Salesforce takes to finish component rendering. Scroll to visible start time position triggered immediately on paint event, when all component is rendered.
You can try to call the scroll yourself before that event, but we can't guarantee it will work as expected.

calendar.scrollable.scrollTo(null, startScrollPos, {
                        animate : false,
                        block   : 'start'
                    });

In bounds of the ticket we will analyse if any option to get timeline positioned faster or even render it on that scroll position initially.

All the best,
Alex


Post Reply