For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/date-picker.md.
v0.0.57
  • English
  • DatePicker

    Data Entry@rockshin/tao-ui

    Lets users enter or choose a single date, with optional time selection.

    When to use

    Use DatePicker when free text date input would be error-prone or when users benefit from calendar context.

    Recommended

    • Support keyboard entry for known dates.
    • Use presets for common relative choices when helpful.

    Avoid

    • Do not force calendar navigation for dates far in the past without typed input.

    Examples

    Basic usage

    TSX

    Picker modes

    TSX

    Time, presets, and disabled dates

    TSX

    Date and time

    showTime combines date and time selection; format the displayed parts accordingly.

    Value: 2026-11-16 12:42:21

    TSX

    Date presets

    Offer common dates through presets to reduce repeated calendar navigation.

    TSX

    Disable unavailable dates

    Use disabledDate for business constraints. This example calculates dates locally.

    TSX

    Sizes and variants

    Choose size and variant to match neighboring input controls.

    TSX

    Status and disabled state

    Use error and warning for validation feedback and disabled for unavailable input.

    TSX

    Locale switching

    TaoProvider locale updates built-in actions, placeholders, and calendar labels.

    TSX

    Date boundaries

    minDate and maxDate constrain input and navigation; this example uses a fixed 2026 range.

    TSX

    Controlled value and clearing

    Store changes in application state and represent a cleared picker with null.

    No selection
    TSX

    Display format

    format changes display text while values remain Dayjs objects.

    TSX

    Mobile date drawer

    Use mobile to try the drawer on desktop and confirm the selected date.

    390 × 640
    TSX

    Mobile drawer titles use mobileTitle, then the nearest Form.Item / FormField label, then localized default text. Required marks and help text are excluded; placeholders only describe the input. For standalone controls or native HTML labels, pass mobileTitle="Departure date" explicitly.

    Mobile selection

    Open the picker in phone mode to try selection, confirmation, and clearing inside a drawer.

    390 × 640
    TSX

    API

    DatePicker

    PropertyDescriptionTypeDefault Value
    disabledWhether to disableboolean | undefined-
    mobileTitleMobile drawer title. Defaults to the Form.Item/FormField label, then locale text.ReactNode-
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-