From 82a24a5a536a73c99d9d71fdfd3ffbb6fd6220d6 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 22 Nov 2021 13:01:22 +0100 Subject: [PATCH] AgendaView fix datepicker autoclose --- src/components/overview/AgendaView.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/overview/AgendaView.vue b/src/components/overview/AgendaView.vue index fac7dfc..33d2d90 100644 --- a/src/components/overview/AgendaView.vue +++ b/src/components/overview/AgendaView.vue @@ -24,13 +24,13 @@ {{ asMonth(selectedDate) }} {{ asYear(selectedDate) }} - + @@ -91,7 +91,7 @@ import { ComponentPublicInstance, computed, defineComponent, onBeforeMount, ref } from 'vue'; import { useEventStore } from '../../store'; import EventSlot from './slots/EventSlot.vue'; -import { date, QDate, useQuasar } from 'quasar'; +import { date, QDate, QPopupProxy, useQuasar } from 'quasar'; import { startOfWeek } from '@flaschengeist/api'; import EditEvent from '../management/EditEvent.vue'; import { QCalendarAgenda } from '@quasar/quasar-ui-qcalendar'; @@ -105,6 +105,7 @@ export default defineComponent({ const quasar = useQuasar(); const datepicker = ref(); + const proxy = ref(); const selectedDate = ref(date.formatDate(new Date(), 'YYYY-MM-DD')); const calendarView = ref('week'); @@ -225,8 +226,13 @@ export default defineComponent({ editDone, events, datepicker, + proxy, remove, selectedDate, + updateDate: (ds: string) => { + selectedDate.value = ds; + proxy.value?.hide(); + }, }; }, });