Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA typed date of birth that cannot be in the future or implausibly old, and that shows the age it implies so a typo in the year is caught straight away. Use this when a form asks for a date of birth and a typo in the year should be obvious.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use it when a form asks for a date of birth and a typo in the year should be obvious.
Do not use it to restrict who may sign up; use age-gate-date-field.
It composes date-field and date-time-core, which the CLI installs for you.
import { BirthDateField } from "@/components/birth-date-field"<BirthDateField name="dob" onValueChange={(dob) => setDob(dob)} />| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue / onValueChange | string | null | null | ISO date of birth. |
| maxAge | number | 120 | Oldest age accepted. |
| today | string | today | Reference day. |
| name | string | - | Hidden input for native forms. |
aria-describedby; errors are in a role="alert" message and the field is marked invalid.The pattern ships with a Testing Library test (birth-date-field.test.tsx) that covers the age maths on a birthday, a future date and too old a date.