Vuepic / vue-datepicker

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

New emit like `internal-model-changed` but with the same formatting as `update:model-value` #808

Closed skstuder closed 5 months ago

skstuder commented 5 months ago

Is your feature request related to a problem? Please describe. So you guys have a handful of formats, and we have to convert them for our purposes. For example, week range format is [[Date,Date],[Date,Date]]. So we have a utility file that handles all these conversions. But we also do validations on pending updates, before the user has made a picker selection.

The problem, is the emitted data from internal-model-changed does not match the formatting of update:model-value, it seems to only emit dates that were clicked.

Describe the solution you'd like A clear and concise description of what you want to happen.

In order to remain backwards compatible, could you make a new emit that fires at the same time as internal-model-changed, but with the formatting of update:model-value?

Describe alternatives you've considered I won't be able to get this solution in time, and have to write a bunch of utility functions specific to translate internal-modal-changed based on props that I am using.

comparison of the two emits for a week-picker with range Screenshot 2024-04-03 at 8 20 24 AM Screenshot 2024-04-03 at 8 20 32 AM