build69
build69  /  Components  /  Date & Time  /  DateInput

DateInput

v1.0.3Updated 20 Jul 2026

Keyboard-first `DD/MM/YYYY` date field with real range constraints — day 1-31 and month 1-12 are enforced by the mask, so `99/99/9999` can never be typed. `autofix: 'pad'` pads a leading `9` to `09` instead of rejecting the keystroke. Use it when typing a date is faster than picking one; reach for DatePicker when a calendar popover is wanted.

Preview

Live · 5 stories
Constrained DateOpen ↗
Why this is recommendedformmaskinputdate+3

DateInput — constrained date.

Recommended for+14
  • Date of birth entry
  • Typing a date without opening a calendar
  • From/to date filters in a filter bar
  • Company registration or issue date fields
  • Fast keyboard date entry on data-heavy admin forms
Tags+6
formmaskinputdatedd-mm-yyyykeyboardconstrained
Features+4
  • `DD/MM/YYYY` mask with MaskedRange day 1-31 and month 1-12
  • autofix 'pad' turns a leading 9 into 09 rather than rejecting it
  • inputMode="numeric" + autoComplete="bday" for autofill
  • Monospace tabular-nums so digits do not jitter while typing
  • No calendar dependency — far lighter than DatePicker
  • Sanitised masked value via onAccept
  • i18n: day/month/year order + separator follow the app LocaleProvider locale via Intl (base "en" keeps the shipped DD/MM/YYYY)
Not recommended for−2
  • Picking a date from a calendar (use DatePicker)
  • Selecting a date range with a calendar (use DateRangePicker)
  • Buddhist Era calendars (use DatePicker)
  • Date + time together (use DateTimePicker)

Install

Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.

get_registry_item({ name: "DateInput" })

Usage

import { DateInput } from '@/components/inputs/input-mask/date-input';

<DateInput value={dob} onAccept={setDob} />

Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.

Props

PropTypeRequired
value

Current masked date, e.g. '12/03/1998'

string
onAccept

Fires whenever the masked value changes

(value: string) => void
onComplete

Fires when the full date is entered

(value: string) => void
aria-invalid

Renders the destructive border and ring

boolean
disabled

Disables the field; the value stays masked

boolean

Related