Vuepic / vue-datepicker

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

v-model and 'date' props in slot #day is not same format #924

Closed aqordeon closed 1 week ago

aqordeon commented 2 weeks ago

Describe the bug in v-model I got the value: 2024-06-29T00:00:00.000000Z in 'date' props in slot #day I got the value: 2024-06-28T16:00:00.000Z (I assume the wrong return is in this part)

Expected behavior Should return the same value, so it easier to compared that

Desktop & mobile (please complete the following information):

The code:

<DatePicker
    v-model="datexxx"
    inline auto-apply
    :disabled-dates="disableBeforeToday"
    :enable-time-picker="false"
>
    <template #day="{ day, date }">
        {{ date == datexxx }}
    </template>
</DatePicker>
Jasenkoo commented 1 week ago

This is intended behaviour, the dates in the calendar have time reset values