Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA date of birth that decides whether someone is old enough, with the exact date they become eligible, without ever blocking typing. Use this when a product or purchase has a minimum age and the person should learn when they will qualify.
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 product or purchase has a minimum age and the person should learn when they will qualify.
Do not use it to just collect a birth date; use birth-date-field.
It composes date-field and date-time-core, which the CLI installs for you.
import { AgeGateDateField } from "@/components/age-gate-date-field"<AgeGateDateField minAge={18} onValueChange={(dob, ok) => setCanContinue(ok)} />| Prop | Type | Default | Description |
|---|---|---|---|
| minAge | number | 18 | Years required. |
| onValueChange | (date: string | null, eligible: boolean) => void | - | The date and whether it passes. |
| today / locale | - | - | Reference day and locale. |
The pattern ships with a Testing Library test (age-gate-date-field.test.tsx) that covers the birthday boundary, the eligibility date and the callback.