Skip to content
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

[Bug Report] v-date-picker range mode causes @change to fire even on 1 date selected #11056

Closed
avxkim opened this issue Apr 8, 2020 · 6 comments
Assignees
Labels
C: VDatePicker VDatePicker T: bug Functionality that does not work as intended/expected

Comments

@avxkim
Copy link

avxkim commented Apr 8, 2020

Environment

Vuetify Version: 2.2.21
Vue Version: 2.6.11
Browsers: Chrome 80.0.3987.163
OS: Mac OS 10.15.4

Steps to reproduce

Documentation says, that @change event fires, when both dates are chosen, i.e: ['2020-05-11', '2020-05-12'], but this @change event fires even when just one date chosen.

Expected Behavior

@change event must be fired when both of dates are chosen, as per documentation.

Actual Behavior

@change event fires even with 1 date selected

Reproduction Link

https://codepen.io/webcoderkz/pen/BaoBYbx

@ghost ghost added the S: triage label Apr 8, 2020
@jacekkarczmarczyk jacekkarczmarczyk self-assigned this Apr 8, 2020
@jacekkarczmarczyk jacekkarczmarczyk added T: bug Functionality that does not work as intended/expected and removed T: documentation labels Apr 8, 2020
@matteoraf
Copy link

https://codepen.io/jkarczm/pen/abvoYGW?editors=1010 vs https://codepen.io/jkarczm/pen/xxwKWjr?editors=1010

What if you want to start with an empty selection?

@jacekkarczmarczyk
Copy link
Member

It works with empty selection, not sure what you mean
You can reach out to us in our Discord community if you have any questions, and if you've found a new bug/regression please create a new issue

@matteoraf
Copy link

It works with empty selection, not sure what you mean
You can reach out to us in our Discord community if you have any questions, and if you've found a new bug/regression please create a new issue

If you start with an empty selection, the Change event is fired as soon as you select the first date.
As for the docs, it should only fire after you select both dates.

@jacekkarczmarczyk
Copy link
Member

it should only fire after you select both dates

And it does in latest version, if I'm mistaken please create a new issue and provide reproduction

@matteoraf
Copy link

it should only fire after you select both dates

And it does in latest version, if I'm mistaken please create a new issue and provide reproduction

My apologies...I didn't realize that the codepen was using the prev version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDatePicker VDatePicker T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

3 participants