Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.38k stars 137 forks source link

@update-month-year Event Not Triggering When Selecting a Day in the Previous or Next Month #925

Closed RLans closed 1 week ago

RLans commented 2 weeks ago

Description I'm encountering issues with the calendar functionality in vue-datepicker. The problem is that the @update-month-year event is not being triggered when selecting a day that falls in the previous or next month. However, @update-month-year does get triggered when using the arrow buttons at the top to navigate through the months.

Steps to reproduce the behavior:

  1. Open a modal containing the datepicker configured to use the @update-month-year event and include a console.log to track the event.
  2. Select a day that falls in either the next or the previous month, without using the arrow buttons to navigate between months.
  3. Check the console to verify if the logging occurs (observe that no logging is found).

Expected behavior I expect the @update-month-year event to be triggered when I click on a day that falls in either the previous or the next month

Screenshots image Started on the 25th(current day), clicked on the 2nd(different month). Arrows do trigger @update-month-year: image

Jasenkoo commented 1 week ago

The event won't be triggered on month or year change, therefore the name. You can use different events to get the clicked date.