You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a calendar in my Ionic application with a fixed width of 225% to let the calendar in weekView mode take up more space. When the calendar init the user sees Monday, Tuesday, Wednesday. If the user wants to see Thursday etc... he can scroll to the left to see the other days.
This works well, but now I want the calendar to automatically scrollLeft to the current day. For example if the current day is Friday, the calendar should scroll left to show Friday (like scrollToHour).
I've tried many things with no luck. Here's a simple example of the code I tested :
public scrollLeft(): void {
const container = document.querySelector('.swiper-slide-active .weekview-normal-event-container .scroll-content') as HTMLElement;
container.scrollLeft = 800;
}
This method is triggered by a button, once the calendar has fully loaded. The container has a total width of 810px, so with scrollLeft to 800 it should scroll to the left. But nothing happens.
I've also tried to play with the .weekview-header the same way (and other classes), put overflow-x: auto !important to some elements, played with scrollIntoView and also checked src/weekview.ts at the scrollToHour handling but it doesn't inspire me.
Any way to do it ? Thanks.
The text was updated successfully, but these errors were encountered:
I have a calendar in my Ionic application with a fixed width of 225% to let the calendar in weekView mode take up more space. When the calendar init the user sees Monday, Tuesday, Wednesday. If the user wants to see Thursday etc... he can scroll to the left to see the other days.
This works well, but now I want the calendar to automatically scrollLeft to the current day. For example if the current day is Friday, the calendar should scroll left to show Friday (like scrollToHour).
I've tried many things with no luck. Here's a simple example of the code I tested :
This method is triggered by a button, once the calendar has fully loaded. The
container
has a total width of 810px, so withscrollLeft
to 800 it should scroll to the left. But nothing happens.I've also tried to play with the
.weekview-header
the same way (and other classes), putoverflow-x: auto !important
to some elements, played withscrollIntoView
and also checked src/weekview.ts at thescrollToHour
handling but it doesn't inspire me.Any way to do it ? Thanks.
The text was updated successfully, but these errors were encountered: