Skip to content
RefineUI

Date Input

An input-style date picker that opens Calendar in a popover.

DateInput combines an input-style trigger, Popover, and Calendar. Selecting a day updates the value; the calendar stays open until you click outside it or press Escape. Set mode="range" to pick a start and end date across two months.

Selected: 11/13/2026

Overview

Machine-readable contract from Component Spec.

component: date-inputexport: DateInputversion: 1tokens.visual: inputattributes: data-refineui=date-input

Anatomy

Partdata-refineui
rootdate-input

Variants

AxisValues
modesingle, range

States

ScopeCategoryValues
componentpseudofocus-visible
componentcomponentselection: placeholder, value
componentcomponentvalidation: error, success
componentavailabilitydisabled
componentenvironmentdir

Accessibility

SlotElementNativeLabeling
date-inputbuttontrueaccessibleName: required

Keyboard

KeyActionNative
Enteractivatetrue
Spaceactivatetrue

Focus

SectionPropertyValue
visualrequiredtrue
visualselector:focus-visible

Layout

PropertyValue
directionlogical
rtltrue

Variant

Select a recipe variant — preview and Recipe → Tokens update together.

Selected: 11/13/2026

Recipe → Tokens

Slot bindings for mode="single" — declared in DateInput/style → Input tokens.

SlotVariantPropertyTraceSemanticLight → foundationDark → foundationRecipe class
root—textinput.textforegroundPrimaryprimaryBlackneutralWhitetext-refineui-alias-foreground-primary placeholder:text-refineui-alias-foreground-placeholder
root—placeholderinput.placeholderforegroundPlaceholderneutral450neutral500placeholder:text-refineui-alias-foreground-placeholder
root—backgroundinput.backgroundbackgroundPrimaryneutralWhiteneutral900bg-refineui-alias-background-primary
root—disabledBackgroundinput.disabledBackgroundbackgroundSurfaceDisabledneutral150neutral850bg-refineui-alias-background-surface-disabled
root—border.defaultinput.border.defaultborderDefaultneutral300neutral650border-refineui-thin border-refineui-alias-border-default
root—border.focusinput.border.focusborderFocusneutral750neutral350border-refineui-thin border-refineui-alias-border-strong
root—border.errorinput.border.errorborderErrorred500red500border-refineui-thin border-refineui-alias-border-error
root—border.successinput.border.successborderSuccessgreen500green500border-refineui-thin border-refineui-alias-border-success
root—border.disabledinput.border.disabledborderDisabledneutral250neutral700border-refineui-thin border-refineui-alias-border-disabled

Component token trace

All paths in token-trace-v2.json prefixed with input.

TraceSemanticLight foundationDark foundationLightDark
input.backgroundbackgroundPrimaryneutralWhiteneutral900#FFFFFF#1A1A1A
input.border.defaultborderDefaultneutral300neutral650#DBDBDB#5B5B5B
input.border.disabledborderDisabledneutral250neutral700#E0E0E0#404040
input.border.errorborderErrorred500red500#FF6969#FF6969
input.border.focusborderFocusneutral750neutral350#333333#D8D8D8
input.border.successborderSuccessgreen500green500#26B12D#26B12D
input.disabledBackgroundbackgroundSurfaceDisabledneutral150neutral850#F0F0F0#222222
input.placeholderforegroundPlaceholderneutral450neutral500#BBBBBB#A4A4A4
input.textforegroundPrimaryprimaryBlackneutralWhite#212121#FFFFFF
npm install @refineui/react @refineui/tokens
import { useState } from "react";import { DateInput } from "@refineui/react"; const [date, setDate] = useState<Date>(); <DateInput  value={date}  onValueChange={setDate}  placeholder="Choose a delivery date"  locale="en-US"  weekStartsOn={1}  fullWidth/>;

Use defaultValue for an uncontrolled field. size="xs" | "sm" | "md" | "lg" | "xl" uses the same control heights, padding, and typography as Input; it also inherits a surrounding Field size. Pass error, success, and disabled just as you would for an Input.

PropDefaultTypeDescription
mode"single""single" | "range"Single date or a start/end range across two months.
value—DateControlled selected date.
defaultValue—DateInitial value for uncontrolled use.
onValueChange—(value: Date) => voidCalled after a day is selected.
rangeStart / rangeEnd—DateControlled range (range mode).
defaultRangeStart / defaultRangeEnd—DateInitial range for uncontrolled range mode.
onRangeChange—(start?: Date, end?: Date) => voidCalled when the range changes; end is undefined until the second day is picked.
placeholder"Select date" / "Select date range"stringText shown before selection.
localebrowser localestringLocale used to format the selected date.
weekStartsOn00 | 1First calendar weekday: Sunday or Monday.
size"lg""xs" | "sm" | "md" | "lg" | "xl"Matches Input control sizing.
fullWidthfalsebooleanMakes the trigger fill its container.
error / success / disabledfalsebooleanInput state styling and availability.