The bug
I have a quasar application where I need to use both QCalendarDay and QCalendarAgenda. On the initial page load, components seem to load just fine, visually it's ok but mouse events don't fire at all. The only error in the console I get is when I navigate to the page with my q-calendar components from some other pages. The error is:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'offsetWidth') QTabs.js:181:1
This is the function on line 181 that causes the error:
My theory
I assume you use QTabs for changing calendar view and on navigation the function recalculateScroll() is called before the component is mounted.
I use QTabs on another page in my application and don't get the same problem.
My component for q-calendar handling looks like this.
Please note that on calendar view change, ref value get changed and mouse events start to work but I expect them to work from the start.
My default calendar mode is day. So when I change to agenda, agenda works. And when I change the mode back to day, day also start to work.
The bug I have a quasar application where I need to use both QCalendarDay and QCalendarAgenda. On the initial page load, components seem to load just fine, visually it's ok but mouse events don't fire at all. The only error in the console I get is when I navigate to the page with my q-calendar components from some other pages. The error is:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'offsetWidth') QTabs.js:181:1
This is the function on line 181 that causes the error:
![q-calendar-error-trace](https://github.com/quasarframework/quasar-ui-qcalendar/assets/32391353/7493c197-1ce9-460c-98e1-93f8cd13cb97)
My theory I assume you use QTabs for changing calendar view and on navigation the function
recalculateScroll()
is called before the component is mounted. I use QTabs on another page in my application and don't get the same problem.My component for q-calendar handling looks like this.
Please note that on calendar view change, ref value get changed and mouse events start to work but I expect them to work from the start. My default calendar mode is day. So when I change to agenda, agenda works. And when I change the mode back to day, day also start to work.
My setup: