Vuepic / vue-datepicker

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

dayClass property should be able to use the internalModelValue #872

Closed Fleximex closed 2 months ago

Fleximex commented 2 months ago

Is your feature request related to a problem? Please describe. I want to style the DatePicker's days mostly manually. I can use the dayClass property for this to also check the context (in my case the current internalModelValue) of the day that needs styling.

The dayClass property reacts to internalModelValue changes. However the function you bind to that property receives only its own date. Locally you can keep a mirrored internalModelValue (using @internal-model-change) to have the dayClass function also have context about the other selected dates. However the reactivity of the dayClass function seems to trigger at the same time as internalModelValue, which means dayClass then does not or only partially have context of the latest internalModelValue.

Describe the solution you'd like I would want an extra property of the latest internalModelValue for the dayClass property callback or the dayClass function to trigger after the reactivity for internalModelValue has triggered.