-
Notifications
You must be signed in to change notification settings - Fork 11
DatePicker remains invalid after clearing its value #201
Comments
This looks like regression. I could not replicate it with Vaadin 13, but it happens with Vaadin 14. |
I’ll start by checking if this can be reproduced with the plain web component and whether https://github.com/vaadin/vaadin-text-field/pull/418/files fixes this issue as well. Update: reproduces with the plain web component (master branch). |
Previous verification was inaccurate. It does not seem to be fixed after all. The crucial step in the bug is that you do not focus the invalid date picker with the mouse, but with the keyboard (Tab key). I updated the issue description. I’ll try to verify it also together with latest Flow, though the assumption is that it is irrelevant for the bug/fix. |
It seems the problem is simply that validation is only run when the overlay is closed, not for example when the field is blurred. |
I didn’t pinpoint the regression, but I checked with one very old project (Vaadin 10.0.2), and there the date picker always shows the overlay when you type in the input (even when clearing it), and the validation is triggered when the users closes the overlay. |
Hello @jouni , Will your fix also work for the following situation?:
|
@DennisBundszus: thanks, I didn’t test that case yet. I’ll do that right away. Update: pressing the clear button will focus the field. The invalid state is still visually shown and is cleared when the user blurs the field. That’s a good catch, that the invalid state should also be removed immediately when the clear button is used. |
The following steps will cause a date picker to remain marked as invalid
Expected outcome: Date picker should not be marked as invalid.
Actual outcome: Date picker remains marked as invalid, even though it no longer requires user action in order to "fix the value" (because empty is allowed).
Version: Vaadin 14.0.6
The text was updated successfully, but these errors were encountered: