Skip to content

Commit

Permalink
fix: update-month-year event not being triggered (fixes #534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Aug 24, 2023
1 parent 3b74930 commit 18d0e04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/VueDatePicker/components/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
'time-picker-open',
'time-picker-close',
'recalculate-position',
'update-month-year',
]);
const props = defineProps({
...PickerBaseProps,
Expand Down
2 changes: 1 addition & 1 deletion src/VueDatePicker/components/DatePicker/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export const useDatePicker = (
if (defaultedMultiCalendars.value.count && !defaultedMultiCalendars.value.solo) {
autoChangeMultiCalendars(instance);
}

emit('update-month-year', { instance, month: val.month, year: val.year });
triggerCalendarTransition(defaultedMultiCalendars.value.solo ? instance : undefined);
updateFlow();
};
Expand Down
1 change: 1 addition & 0 deletions src/VueDatePicker/components/DatepickerMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
@time-picker-open="$emit('time-picker-open', $event)"
@time-picker-close="onTimePickerClose"
@recalculate-position="recalculatePosition"
@update-month-year="$emit('update-month-year', $event)"
@update:internal-model-value="$emit('update:internal-model-value', $event)"
>
<template v-for="(slot, i) in sharedSlots" #[slot]="args" :key="i">
Expand Down

0 comments on commit 18d0e04

Please sign in to comment.