fix: ensure invalid state is correctly set on slotted pickers #7074
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #7073
Due to the change in #6922, the component always sets
invalid
property onisInvalid()
on attach. While this makes sense in general, it turns out that callingsetInvalid(true)
on the DateTimePicker does not update corresponding state on its slotted pickers and they end up sendinginvalid = false
to the client on initialisation.Note: I'm not sure if this needs an IT since the problem is that
isInvalid()
returns wrong value and that's now covered with a unit test. Just to clarify, this problem can't be reproduced in the web component (withoutClientValidationUtil
logic).Type of change