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 with DatePicker when inputting date range #1236

Closed
wants to merge 5 commits into from
Closed

Bug with DatePicker when inputting date range #1236

wants to merge 5 commits into from

Conversation

Patrick-Keenan
Copy link

@Patrick-Keenan Patrick-Keenan commented Jan 3, 2023

While using input elements to update the Date Picker a user can encounter a bug where a valid date range can be rejected and set to a singular day equal to the end date.

When entering a start date with a year less than that of the end date and a MM/dd later in the year than the end date, the input is treated as if it is greater than the end date. See the first video for examples using the v-calendar guide. The bug occurs when 10/17/2019 and 10/18/2019 are entered.

This is caused by the comparison of the dates as strings rather than as date objects. The second video shows the implemented fix has solved the problem.

Screen.Recording.2023-01-02.at.11.57.45.AM.mov
Screen.Recording.2023-01-02.at.10.51.39.PM.mov

@Patrick-Keenan
Copy link
Author

@nathanreyes
Any chance I could get a review and merge? Would rather not rely on a fork for this single problem.

@Patrick-Keenan
Copy link
Author

@nathanreyes
Can I please get a review and merge when possible?

@verstoff
Copy link

verstoff commented Mar 7, 2023

We can omit any additional type conversion (because we already have Date's instances from normalizeDate in this function) and only fix the logic instead.
#1265

Thank you, Patrick! Waiting for fix either

@takt-corp takt-corp closed this by deleting the head repository Sep 6, 2023
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.

3 participants