Skip to content

onInvalid event handler not passed to input. #119

@hugo

Description

@hugo

Expected Behavior

When marking the DatePicker as required it should also be possible to attach an onInvalid event handler to handle custom validation when a date is not selected.

Current Behavior

When marking a field as required, the browser default validation handler runs.

Possible Solution

Pass through event handlers to the underlying InputControl

Context

We are using the DatePicker component in a complex form where overriding the browser default invalid behaviour is an important UX consideration. As the <DatePicker /> component doesn't allow us to override the onInvalid handler, it makes the form seem janky and unprofessional.

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