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

[date-time-picker] Invalid state not reset when setting required property to false #7906

Closed
web-padawan opened this issue Oct 2, 2024 · 0 comments · Fixed by #7908
Closed

Comments

@web-padawan
Copy link
Member

web-padawan commented Oct 2, 2024

Description

Unlike individual pickers, vaadin-date-time-picker doesn't reset invalid to false when required is unset.

Interestingly, the invalid is reset on vaadin-date-picker in this case leaving the field in a weird state:
Screenshot 2024-10-02 at 13 15 00

Expected outcome

Expected the field to become valid if value isn't provided when setting required to false.

Minimal reproducible example

<vaadin-date-time-picker
  label="Appointment date and time"
  required
  error-message="This field is required"
></vaadin-date-time-picker>

<script type="module">
  import '@vaadin/date-time-picker';
</script>

Steps to reproduce

  1. Add the snippet above to the HTML page
  2. Focus the date-picker
  3. Press Tab to focus time-picker
  4. Press Tab once again
  5. Set required to false in the console

Environment

Vaadin version(s): V24, V23

Browsers

Issue is not browser related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant