Vuepic / vue-datepicker

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

Simplify ranges for month and week pickers #825

Closed laurens94 closed 4 months ago

laurens94 commented 5 months ago

Is your feature request related to a problem? Please describe. When using the datepicker in range-mode, it would be great to have a simple, consistent modeltype between the different pickers (days/weeks/months).

Right now the different pickers behave differently in determining what the 'end time' of a range is.

E.g. the week and month pickers end on the start of the last week/month, instead of it's end. The day picker currently returns the last timestamp of the last day.

Describe the solution you'd like It would be nice to have a simple [startTimestamp, endTimestamp] as model for any range, similar to the way the day-picker currently functions.

Describe alternatives you've considered I suppose an alternative would be to do a lot of conditional logic and transforming the model types accordingly.

Additional context

Screenshot 2024-04-11 at 12 35 02

Here's an overview of the current behavior of the different pickers: https://stackblitz.com/edit/vuepic-vue-datepicker-rm8tdk?file=src%2Fcomponents%2FPlayground.vue

Jasenkoo commented 4 months ago

This is too much tweaking just to have hours, by design you don't show hours in these modes, if needed, you can just manually update the end value. You can also provide custom format function and display the value you want.