Skip to content

DateField

Types a date segment by segment.

Publish date
9232026
DateField.tsx
import {DateField} from 'alinea/components'

export function DateFieldExample() {
  return (
    <DateField
      label="Publish date"
      defaultValue="2026-09-23"
      style={{width: 220}}
    />
  )
}

Props

PropTypeDefaultDescription
localestring; /** The date, `YYYY-MM-DD` */ value?: string | null; defaultValue?: string | null; onValueChange?: (value: string | null) => void; /** The earliest valid date, `YYYY-MM-DD` */ min?: string; /** The latest valid date, `YYYY-MM-DD` */ max?: string; name?: string; autoFocus?: boolean;Default –BCP 47 locale used to format dates, eg. en-GB, defaults to the user's locale
labelReactNodeDefault –
descriptionReactNodeDefault –
errorReactNodeDefault –
requiredbooleanDefault –
disabledbooleanDefault –
readOnlybooleanDefault –
iconIconType | ReactElementDefault –
sharedbooleanDefault –Marks the field as shared between translations

Also accepts className and style, id and aria-* labelling attributes and data-* attributes.