onInvalid event handler not passed to input.
Closed this issue · 4 comments
hugo commented
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.
wehriam commented
Seems like a good idea to me.