-
Notifications
You must be signed in to change notification settings - Fork 85
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: revert input on overlay close by escape #7293
fix: revert input on overlay close by escape #7293
Conversation
return date.toISOString().split('T')[0]; | ||
} | ||
|
||
const TODAY_DATE = formatDateISO(new Date()); |
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.
These changes are not actually related to the issue. This formatting does not take time zones into consideration. This leads to tests failing when time zone is not GMT.
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.
I think we could extract this change into separate PR marked as test:
and maybe backport to 24.3
.
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.
Extracted the test PR and reverted the changes in this one.
@@ -1,19 +1,12 @@ | |||
import { expect } from '@esm-bundle/chai'; | |||
import { aTimeout, fixtureSync, nextRender, outsideClick, tap } from '@vaadin/testing-helpers'; |
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.
Unused import.
|
* fix: revert input and do not commit on overlay escape * refactor: commit the reverted date so that the validation cycle runs * test: revert test update for unparsable value change event * test: revert test formatter changes
Co-authored-by: Ugur Saglam <[email protected]>
Description
Currently, when
escape
the input is not reverted and the date picker is validated using the unparsable input.
This PR reverts the input value to the last selected date if the overlay is closed using
escape
.!!! This fix was tested with the Flow counterpart. However, if any regressions occur regarding the validation chain, this PR can be the culprit. !!!
Fixes #4354
Type of change
Checklist