-
Notifications
You must be signed in to change notification settings - Fork 1k
fix DateInput format calendar bounds #6438
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 DateInput format calendar bounds #6438
Conversation
It looks like this bug may have already been solved in #6214 I am no longer able to reproduce the issue |
With click the bounds work correctly, the problem occurs when you try to write the date in the input (It lets you select any date). I should have explained better |
Ah okay I see thanks for explaining |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this! The behavior seems to be working as expected. My comments are more related to some Grommet naming conventions/code cleanups.
1e8959b
to
e0c4efd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really great. The last thing that would be great to add is a unit test so we can make sure not to have regressions in the future.
This test can mirror the set up you used locally to test the behavior. We could want the test to:
- Type in an "invalid" date to the DateInput
- Check that the value is still undefined
Let me know if you need any help writing the test.
e0c4efd
to
f8d1013
Compare
@taysea I have created the tests, could you check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks good to me, thank you!
What does this PR do?
Fix the issue #6159
Where should the reviewer start?
DateInput component
What testing has been done on this PR?
How should this be manually tested?
add
and
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
I'll need #6424 to be merged first, because I'll need thesetHoursWithOffset
function to solve a issue with dates with wrong offsetWhat are the relevant issues?
closes #6159
Screenshots (if appropriate)
Do the grommet docs need to be updated?
Should this PR be mentioned in the release notes?
Is this change backwards compatible or is it a breaking change?