Skip to content

[date-time-picker] Do not mark as invalid when readonly #4181

@web-padawan

Description

@web-padawan

Description

In components where we use native <input> and call its checkValidity(), it returns true when the input is readOnly, as mentioned in #3750 (comment). We should mimic this behavior in vaadin-date-time-picker to not validate on blur when readonly.

Expected outcome

The component should not be invalid, like other components (vaadin-text-field, vaadin-combo-box).

Minimal reproducible example

<vaadin-date-time-picker required readonly></vaadin-date-time-picker>

Steps to reproduce

  1. Add the snippet to the page
  2. Press Tab to focus and then blur the date and time pickers

Environment

Vaadin version(s): Vaadin 22 - 23.2 alpha

Browsers

Issue is not browser related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions