Vuepic / vue-datepicker

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

Question: Prevent calendar from switching to next/previous month when clicking outside of current month #797

Closed germsb closed 6 months ago

germsb commented 6 months ago

Is there any option to prevent this behavior? I find it very disturbing when you have to select a period between two months.

https://stackblitz.com/edit/vuepic-vue-datepicker-jq9xwm?file=src%2Fcomponents%2FPlayground.vue

Jasenkoo commented 6 months ago

This is expected behavior, and it is handled automatically when clicking a date. It would require some unnecessary checks to prevent this behavior. You can just hide the offset dates if it is causing a distraction.

germsb commented 6 months ago

This would certainly have represented a bit of work, but would have greatly improved input for the end user and reduced the number of clicks. I find it a shame and a little hasty to close this discussion without having thought about it at least.

Jasenkoo commented 6 months ago

I will see what can be done, but can't promise anything, if it starts interfering with the existing logic, it will be closed.