-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(VDatePicker): select same date as start/end in date range picker #19990
base: master
Are you sure you want to change the base?
fix(VDatePicker): select same date as start/end in date range picker #19990
Conversation
How do you clear a value then? |
Thank you for your question! In my understanding, if the user clicks on the wrong first date, they can click on any other date to complete the range selection, and then click again to select the right first date. This UX seems intuitive enough. If we are talking about clearing the input completely - yes, it's not possible. But it's not possible for a single date picker either ( |
Fair arguments. @vuetifyjs/core-team thoughts? |
We still run into the case that people more than likely already have applications that depend on or expect this behavior, so we can't simply remove it, especially in a patch. |
Counterpoint is that people upgrading from Vuetify2 expect the original |
For the context, other libraries also have the proposed behavior in their date-range pickers: |
The range with the same start/end dates is a valid date range and not a bizarre edge case. And so it must be covered by the date selector out of the box. We can think of the date range as a time period that starts at 12:00 AM, startDate and finishes at 11:59 PM, endDate. But what about a 24h period?
|
If clearing the state is critical, it could also be done when the user clicks on the existing range selection (the same approach as in Quasar). Or a dedicated “x” icon can be added for clearing. |
e20cfec
to
2766105
Compare
4c970f9
to
6a3285f
Compare
I have added an |
ProblemUnfortunately, there is another problem. But in the parent component, we might want to do something when the user completes the range selection. When we receive ProposalIdeally, we could change when we emit Alternative proposalAlternatively, we could emit an additional event on the second click, to indicate range selection completion.
|
I like the alternate proposal. |
fixes 19989
Description
fixes #19989
Markup: