Replies: 2 comments 6 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
I am guessing that since with |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Thanks for your earlier help, Jeff. I am now on Quasar V2 and QCalendar App Extension 4.0.0-beta.12. (I am using the app extension because I will be using most of your great components anyway, and am in devland at the moment, exploring). I am still using the Options API until I get all my app upgraded to Q2.
I have a wrapper component which in turn wraps 3 of my components. Each of those contains a

<q-calendar-*>
ie a day, week and month instance. On my main component I have a toolbar with 3 buttons to select either the day, week or month view via their child wrapper components. Here is a screenshot.The buttons set the
calendarView
model prop so the matching view is displayed. Standard stuff.My question concerns having 3 calendars as children and a problem with event handlers. As you see below I am using
v-if
but if I usev-show
I have problems with the mouse event handlers as described below. I am not sure if this is a bug, or me. ;-)So, an abridged sample of my layout is:
The issue is with the
@click-date
event.In my CalendarMonth component I have a
q-calendar-month
like this (abbreviated):and on my CalendarWeek:
When I click a date in the month view when using
v-if
above, my console logsrCalendarMonth onClickDateMonth emitting 2021-12-22
which is correct.But when I change to using
v-show
and do the same thing, the event does not fire at all. Digging into the debugger, theuseMouse.js getMouseEventHandlers()
does the$emit(eventName, getEvent(mouseEvent, eventName))
when usingv-if
but is never reached when usingv-show
.I was hoping to use
v-show
to maintain ui state for each calendar view. Is there another way to do it? I originally tried using<q-tab-panels>
andkeep-alive
but that also gave similar problems with event handlers. Perhaps I am missing something in my understanding of Vue.Thanks!
Murray
Beta Was this translation helpful? Give feedback.
All reactions