mengxiong10 / vue2-datepicker

A datepicker / datetimepicker component for Vue2
https://mengxiong10.github.io/vue2-datepicker/index.html
MIT License
1.51k stars 405 forks source link

[Feature request] Possibility to show date and time at the same time #674

Open jancborchardt opened 2 years ago

jancborchardt commented 2 years ago

What problem does this feature solve? Currently when we use the datepicker e.g. in Nextcloud Calendar, it is often confusing to people that they first have to pick a date and then a time (even though they e.g. click on the part of the input which shows the time).

What does the proposed API look like? Not sure about the API, but proposed solution for this would be to make it look like the datetime-local picker does on Chromium. That way people can pick whichever Datetime picker

That way people can set either date or time, or both at the same time, whichever people need, and it’s not a forced 2-step flow. :)

mengxiong10 commented 2 years ago

FYI: https://codesandbox.io/s/show-date-and-time-side-by-side-1t5zw?file=/src/App.vue

jancborchardt commented 2 years ago

Thanks a lot @mengxiong10! :) We will change our component to reflect that. Maybe it’s good to document this way of working so others also know it’s possible, or did we miss something?

akhchan99 commented 2 years ago

Are there anyway to retain the time panel value after selecting a new date? as the samples will reset the time to 12:00:00AM whenever a date is selected.