Skip to content

[DateTimePicker] Binder does not receive partial values (containing only date or time) #5316

Closed as duplicate of#6697
@simasch

Description

@simasch

Description

I use a DateTimePicker with a Binder.

Because the value of the DateTimePicker is not sent to the server as long as it's not valid, this causes unexpected behavior in combination with the binder.

The form is valid for the binder even if the value is not, and the entered value gets lost after saving.

This makes using a DateTimePicker with a Binder practically unusable.

Expected outcome

Binder should have validation error if the value in the DateTimePicker is not valid.

Minimal reproducible example

https://github.com/simasch/vaadin-picker

Steps to reproduce

  1. Enter a date but no time in the DateTimePicker
  2. Hit the save button

Result: The entered data in the DateTimePicker is lost

Environment

Vaadin version(s): 24.1.4

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