Date Input

Masked text input for typing dates with automatic formatting and validation

import { DateInput } from "@plexui/ui/components/DateInput";

Examples

Overview

variant
size

With time

With seconds

Limits

US format

ISO format

With Field

Enter your date of birth

Validation

Disabled

Reference

PropTypeDefaultDescription
valueDateTime | nullSelected date (Luxon DateTime)
onChange(date: DateTime | null) => voidCalled when a complete valid date is entered or the field is cleared
modeMaskitoDateMode"dd/mm/yyyy"Date format mode: dd/mm/yyyy, mm/dd/yyyy, yyyy/mm/dd, etc.
separatorstring"."Character between date parts
timeModeMaskitoTimeModeEnable time input: HH:MM, HH:MM:SS, etc.
dateTimeSeparatorstring", "Separator between date and time parts
timeStepnumber0Arrow-key increment step for time (ms)
minDateTimeEarliest allowed date
maxDateTimeLatest allowed date
clearablebooleanfalseShow clear button when input has a value
sizeControlSize"md"Input size (3xs–3xl)
variant"outline" | "soft""outline"Visual style
disabledbooleanfalseDisable input
invalidbooleanfalseMark as invalid
placeholderstringAuto-generated from format if not set