Replies: 1 comment 6 replies
-
|
That's already the behavior I get here when submitting a form when the date is incomplete: https://react-aria.adobe.com/DateField#forms
Did you mean that or something else? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
We have a requirement where I need to show an error message if a user tries to submit a form with an incomplete (optional) date field. Essentially it needs to mimic the default native behaviour of a date input field:
It seems that the DatePicker doesn't provide the same behaviour for this particular scenario, even though it matches the other constraint validation (ie. min, max, required). I was hoping to be able to do this via
validateprop, but if I'm understanding correctly - that only triggers on value change, and if a user blurs out of the field with an incomplete input, the value constrains to valid date? That is, if I'm interpreting @devongovett's comment in this PR correctly.Any recommendations for how to handle this?
Reference example with both React Aria
DatePickerand a nativedateinput:https://stackblitz.com/edit/adpptivm?file=src%2FExample.tsx
Beta Was this translation helpful? Give feedback.
All reactions