diff --git a/src/modules/events/components/EventCalendarPopup.vue b/src/modules/events/components/EventCalendarPopup.vue new file mode 100644 index 0000000..9a16173 --- /dev/null +++ b/src/modules/events/components/EventCalendarPopup.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/modules/events/components/EventCalendarView.vue b/src/modules/events/components/EventCalendarView.vue index c77b908..f0a70c8 100644 --- a/src/modules/events/components/EventCalendarView.vue +++ b/src/modules/events/components/EventCalendarView.vue @@ -12,6 +12,10 @@ import type { Event } from '../types/event' const props = defineProps<{ events: Event[] + /** When true, render only the month grid for date-picking — no + * selected-day events panel — and emit selectDate on every day tap + * (used inside the calendar popup). */ + pickerMode?: boolean }>() const emit = defineEmits<{ @@ -77,6 +81,12 @@ const selectedDayEvents = computed(() => { }) function selectDay(date: Date) { + // Picker mode: every tap selects + emits (parent closes the popup). + if (props.pickerMode) { + selectedDay.value = date + emit('selectDate', date) + return + } if (selectedDay.value && isSameDay(selectedDay.value, date)) { selectedDay.value = null } else { @@ -97,7 +107,7 @@ function nextMonth() {