Skip to content

Fields should not validate on Enter if nothing has changed #6591

@vursen

Description

@vursen

Description

When you press Enter, DatePicker, TimePicker and ComboBox trigger validation even if the input element's value hasn't actually changed. This doesn't align with the behavior of other field components e.g. TextField.

Expected outcome

DatePicker, TimePicker and ComboBox should validate on Enter only if the input element's value has changed since the last press.

Minimal reproducible example

<vaadin-date-picker required></vaadin-date-picker>
<vaadin-time-picker required></vaadin-time-picker>
<vaadin-combo-box required></vaadin-combo-box>

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

Steps to reproduce

  1. Focus any field
  2. Press Enter
  3. Observe that the field has invalidated

Environment

Vaadin version(s): 24.3 and earlier
OS: Mac OS

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