Skip to content

DateField

Anatomy

A <DateField> is a wrapper around three segments (month, day, year) that the user navigates with arrow keys. Each segment is keyboard-driven and never opens a popover — for a popover calendar, use <DatePicker>.

<DateField label="Birthday" />
<DateField label="Joined" defaultValue={today(getLocalTimeZone())} />
<DateField label="Renewal" minValue={today(getLocalTimeZone())} tone="brand" />

When to use

  • A single date that doesn’t need a calendar picker (birthday, due date, appointment).
  • Inside larger forms where opening a popover would feel heavy.

When to reach for <DatePicker> instead

  • Users need to scan a month at a glance.
  • The valid date range is small and visualizing it as a grid helps.

Examples

Controlled with react-aria-components date utilities

import { parseDate, type DateValue } from '@internationalized/date';
import { DateField } from '@helixui/core';
const [value, setValue] = useState<DateValue | null>(parseDate('2026-05-25'));
<DateField label="Renewal" value={value} onChange={setValue} />

Validation

<DateField
label="Departure"
isInvalid={isPast(departure)}
errorMessage="Departure must be in the future."
tone="danger"
/>

Install: @helixui/core

import { DateField } from '@helixui/core'

status: stable · since: 0.1.0

Tags: date, input, segmented, picker, calendar

Props

NameTypeDefaultDescription
labelstringundefinedField label rendered above the segmented input.
descriptionstringundefinedHelper text rendered below the field.
errorMessagestringundefinedValidation message shown when the field is invalid.
tone'brand' | 'neutral' | 'danger'brandTone for the focus ring and error styling.
size'sm' | 'md' | 'lg'mdTouch target size, matching every other helixui input.
valueDateValue | nullundefinedControlled value.
defaultValueDateValueundefinedUncontrolled initial value.
onChange(value: DateValue | null) => voidundefinedFires whenever the user completes a segment edit.
minValueDateValueundefinedEarliest selectable date.
maxValueDateValueundefinedLatest selectable date.
isDisabledbooleanfalseRenders the field disabled and removes it from tab order.
isReadOnlybooleanfalseRenders the field non-editable but still focusable.

Tokens used

color.bg.input, color.bg.surface.default, color.border.subtle, color.border.action.brand, color.border.danger, color.text.primary, color.text.secondary, color.text.muted, color.text.action.brand, color.text.danger, radius.sm, radius.md, spacing.1, spacing.2, spacing.3, spacing.4, font.size.sm, font.size.md, font.size.lg, font.size.xs

Accessibility

Role: group

Keyboard

KeyAction
TabFocus the next segment.
ArrowUpIncrement the focused segment.
ArrowDownDecrement the focused segment.
0-9Overwrite the focused segment.

Notes

  • Each segment is independently focusable.
  • Disabled and read-only states respect ARIA conventions.
  • errorMessage is announced via aria-describedby.