XiodUI
HomeDocs
OverviewComponentsStyling & CustomizationChangelog

Components

  • Accordion
  • Agent Steps
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Button Split
  • Calendar
  • Card
  • Carousel
  • Checkbox
  • Circular Progress
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy To Clipboard
  • Corner Badge
  • Dashboard Grid
  • Date Picker
  • Dialog
  • Dot Matrix
  • Draggable
    Updated
  • Drawer
  • Empty
  • Field
  • Fieldset
  • File Upload
    Updated
  • Form
  • Frame
  • Gauge
  • Grid
  • Group
  • Input
  • Input Group
  • Input OTP
  • Input Payment
  • Input Phone
    Updated
  • Input Sensitive
  • Kbd
  • Kinetic Click
  • Label
  • List Box
    Updated
  • Loader
  • Marker
  • Menu
  • Menubar
  • Message
  • Meter
  • Morphic Toast
  • Navigation Menu
  • Number Field
  • Option Picker
  • Orb
  • Pagination
  • Popover
  • Preview Card
    Updated
  • Progress
  • Radio
  • Resizable
  • Ruler Picker
  • Scroll Area
  • Scroll Bar
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Sortable
  • Switch
  • Table
  • Tabs
  • Text
  • Textarea
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
  • Waveform
  • Wheel Picker

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Date Picker

Previous: Dashboard GridNext: Dialog

A field that opens a calendar for picking a date or a range.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { DatePicker } from "xiod-ui/date-picker";

API Reference

Detailed documentation of properties and options.

DatePicker

Accepts render, plus every native attribute of the element it renders.

PropTypeDefaultDescription
align
"center"|"start"|"end"
start

How the calendar lines up with the trigger along that side.

controlId
Dashboard GridDialog
string
–

The id of the button, or of the (first) input, so a <label htmlFor> can name it.

defaultOpen
boolean
false

Whether the calendar starts open, when open isn't controlled.

defaultValue
Date|DateRange
–

The date, or { from, to } range, selected at first, when it isn't controlled.

disabled
Matcher | Matcher[]
–

true disables the whole picker. Anything else names days that can't be selected, the ways Calendar's disabled does: a date, a list of dates, a function that returns true for a date, { before }, { after } or { dayOfWeek }.

disableOutsideDays
boolean
false

Whether days from the previous and next months can't be selected.

endName
string
–

The form field name of the end date, in range mode.

fixedWeeks
boolean
true

Whether every month shows six weeks, so the calendar's height doesn't change between months.

formatStr
"PPP"|"LLL dd, y"|"yyyy-MM-dd"
PPP

How the button shows a date: "PPP" for September 26, 2026, "LLL dd, y" for Sep 26, 2026, or "yyyy-MM-dd" for 2026-09-26. With locale, the first two follow that locale's long and medium date styles.

icon
ReactNode
–

Replaces this icon. Accepts any node; null renders no icon. Takes precedence over IconProvider.

labels
Partial<DatePickerLabels>
–

Replaces the built-in text for this instance. See LabelsProvider to change it everywhere.

locale
string
–

A BCP 47 locale, such as "de-DE", for the button's date and the calendar's month and weekday names. Defaults to English.

maxDate
Date
–

The latest date that can be selected, by clicking or typing.

minDate
Date
–

The earliest date that can be selected, by clicking or typing.

mode
"single"|"range"
single

Whether the user picks one date (single) or a start and end date (range).

name
string
–

The form field name. The date is submitted as YYYY-MM-DD; in range mode this is the start date's name.

numberOfMonths
number
1

How many months the calendar shows side by side.

onOpenChange
((open: boolean) => void)
–

Called when the calendar opens or closes.

onSelect
((value: Date | DateRange) => void)
–

Called with the new date, or the new { from, to } range, when the user picks or types one.

open
boolean
–

Whether the calendar is open. Use with onOpenChange to control it.

placeholder
string
–

The text shown when no date is selected.

required
boolean
–

Whether a date is required.

showOutsideDays
boolean
true

Whether the calendar shows the days of the previous and next months that fill the first and last weeks.

side
"top"|"bottom"|"left"|"right"|"inline-end"|"inline-start"
bottom

The side of the trigger the calendar opens on.

sideOffset
number
8

The gap between the trigger and the calendar, in pixels.

triggerClassName
string
–

Classes for the button or input that opens the calendar.

triggerSize
"lg"|"sm"|"default"|"xs"
default

The Button size of the trigger, when triggerType is button.

triggerType
"button"|"input"
button

What opens the calendar: a button showing the formatted date, or an input the user can also type a date into.

triggerVariant
"default"|"outline"|"secondary"|"ghost"
outline

The Button variant of the trigger, when triggerType is button.

value
Date|DateRange|null
–

The selected date, or { from, to } in range mode. Use null for no date while controlled, and update it from onSelect.

weekStartsOn
0|1|2|3|4|5|6
0

The first day of the week, from 0 for Sunday to 6 for Saturday.