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

Month range picker doesn't trigger rangeStart rangeEnd events properly #1006

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

jllavec
Copy link

@jllavec jllavec commented Sep 26, 2024

Describe your changes

I changed how events are triggered, because when end of range date selected is sooner than start of range date, it triggers range-start twice.

So now, i mantain the unshift in the array to have dates in proper order, but triggering range-end event since range selection is finished.

Issue ticket number and link

Fixes #1005

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have ensured that unit tests pass without errors
  • If it is a new feature, I have added a new unit test

@Jasenkoo
Copy link
Contributor

Jasenkoo commented Oct 9, 2024

@jllavec I appreciate the PR, however, instead of removing re-emit if the range order is changed, can you only correct the second emit name?

@jllavec
Copy link
Author

jllavec commented Oct 9, 2024

Are welcome @Jasenkoo :) Glad to help!

Is this an intended behavior for range month picker for any purpose?

Just want to understand it, since as i checked, in range date picker, it doesn't behave like this. So that's why i replicated this behavior, as I wanted to show in the stackblitz that i provided in the issue #1005 .

@Jasenkoo
Copy link
Contributor

Jasenkoo commented Oct 9, 2024

You are right, there is no need to emit again.

@Jasenkoo Jasenkoo merged commit 74b1fd3 into Vuepic:main Oct 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Month range picker doesn't trigger rangeStart rangeEnd events properly
3 participants