Ladybro
Ladybro

Reputation: 806

FullCalendar: Prevent auto-scroll after updating options

I'm using the Javascript fullcalendar package. After creating a new event, I'm assigning the updating the calendar options events property:

this.calendarOptions.events = this.timeslots

When I do this, the calendar scrolls the view back up to the initial scrollTime property in the calendar options:

scrollTime: "08:00:00"

This happens even if I set the scrollTime to null before setting events. The created event is then out of view and not visible.

How can I prevent the calendar from autoscrolling?

Upvotes: 1

Views: 1388

Answers (1)

Ladybro
Ladybro

Reputation: 806

Turns out Fullcalendar added a scrollTimeReset flag just a week ago that prevents auto-scrolling after updating the options: https://fullcalendar.io/docs/scrollTimeReset

Worked nicely for me after upgrading all packages to 5.7.0!

Upvotes: 3

Related Questions