Skip to main content

DatePicker

A date input with a popup calendar for selecting a single date. Supports year navigation and date constraints.

Basic Usage

With Label

Variants

Sizes

Error State

Disabled

Mobile variant

On touch devices the inline calendar popover is too cramped for comfortable selection. mobileVariant lets you pick the strategy:

ValueMobile rendering
modal (default)Opens the calendar as a fullscreen Dialog with safe-area padding. Large tap targets, scrollable months.
nativeFalls back to the browser's native <input type="date"> picker — gives users the OS-native spinner (iOS wheel, Android material).
<DatePicker mobileVariant="native" label="Date of birth" />

Pick native for system-critical fields (DOB, deadlines) where OS familiarity wins. Pick modal for app-themed selectors where look-consistency matters.

Mobile considerations

  • Day cells meet the 44×44px tap target on mobile (cell size scales up automatically on coarse pointer).
  • Calendar dialog uses .tui-glass surface — translucent on capable browsers, opaque fallback elsewhere.
  • The dialog respects iOS safe areas (notch + home indicator) automatically.

Props

PropTypeDefaultDescription
valueDate | null-Controlled selected date
defaultValueDate | null-Default selected date (uncontrolled)
onChange(date: Date | null) => void-Callback when date changes
placeholderstring-Placeholder text
variant'outlined' | 'filled''outlined'Visual variant
size'sm' | 'md' | 'lg''md'Size
localestring'ko-KR'Locale for day/month labels
dateFormatstring'yyyy.MM.dd'Date format string
minDateDate-Minimum selectable date
maxDateDate-Maximum selectable date
disabledbooleanfalseDisabled state
errorbooleanfalseError state
errorMessagestring-Error message
labelstring-Label displayed above the input
requiredbooleanfalseWhether the field is required (shows red asterisk)
mobileVariant'modal' | 'native''modal'Mobile rendering: themed fullscreen dialog or native OS picker
classNamestring-Additional CSS class
styleCSSProperties-Inline styles