Vuepic / vue-datepicker

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

Disabled times bugs when adding minDate #841

Closed aminebenaddi-centris closed 3 months ago

aminebenaddi-centris commented 3 months ago

Describe the bug First of all, I wanna thank you for your efforts to maintain this library. So my case is that I'm letting the user choose a time every 15min ( only 00m-15m-30-45 are selectable ), and I added a disabledTimes to disable time when the time is in the past ( for example, its 10:16, I won't let the user select 10:00 and 10:15 ). So all of that worked without a problem, but I will need also to disable past datetimes, so I used min-Date to disabled selecting datetime before 10:00. But the problem now is that I can select all times of the minDate.

To Reproduce Steps to reproduce the behavior: I'm using this props : disabled-times / min-date / disabled-times / minutes-increment / minutes-grid-increment / time-picker-inline

Expected behavior A clear and concise description of what you expected to happen. Past days and times are unselectable Screenshots If applicable, add screenshots to help explain your problem. Without minDate:

https://github.com/Vuepic/vue-datepicker/assets/127763596/074375af-6cc2-48e8-b0a7-26ae53c94431

With minDate:

https://github.com/Vuepic/vue-datepicker/assets/127763596/a7d75e7a-78c8-4454-8069-65ae6b54161e

Desktop & mobile (please complete the following information):

Jasenkoo commented 3 months ago

Everything looks to be working as expected on this example. Make sure that the props you are passing are correct. Also, to properly debug this I would need to see what data you are providing.