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

Calendar

Previous: Button SplitNext: Card

A month grid for picking a single date or a range.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import { Calendar } from "xiod-ui/calendar";

API Reference

Detailed documentation of properties and options.

Calendar

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

PropTypeDefaultDescription
classNames
CalendarClassNames
–

Classes for the calendar's parts, keyed by part name.

defaultMonth
Date
–
Button SplitCard

The month shown at first, when it isn't controlled. Defaults to the selected date's month, or today's.

disabled
Matcher | Matcher[]
–

Days that can't be selected: true for all, a date, a list of dates, a function that returns true for a date, { before } and { after } limits, or { dayOfWeek } with 0 for Sunday. Pass an array to combine them.

disableOutsideDays
boolean
false

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

fixedWeeks
boolean
true

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

labels
Partial<CalendarLabels>
–

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 month and weekday names. The locale* lists take precedence. Defaults to English.

localeMonths
string[]
–

Full month names, starting from January. Defaults to English.

localeMonthsShort
string[]
–

Short month names, starting from January, for the month picker and the selection summary. Defaults to English.

localeWeekdays
string[]
–

Short weekday names for the column headings, starting from Sunday. Defaults to English.

localeWeekdaysLong
string[]
–

Full weekday names for screen readers, starting from Sunday. Defaults to English.

maxDate
Date
–

The latest date that can be selected. The calendar can't navigate past its month.

minDate
Date
–

The earliest date that can be selected. The calendar can't navigate before its month.

mode
"single"|"range"
single

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

modifiers
Record<string, Matcher | Matcher[]>
–

Named groups of days, each matched the same ways as disabled. Style them with modifiersClassNames.

modifiersClassNames
Record<string, string>
–

Classes for the days in each group named in modifiers, keyed by the group's name.

month
Date
–

The month shown (the first, with numberOfMonths). Use with onMonthChange to control it.

nextIcon
ReactNode
–

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

numberOfMonths
number
1

How many months to show side by side.

onMonthChange
((month: Date) => void)
–

Called with the first day of the new month when the calendar pages to another month.

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

Called with the new date, or the new { from, to } range in range mode, when the user picks a day.

prevIcon
ReactNode
–

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

selected
Date|DateRange|null
–

The selected date, or { from, to } in range mode. The calendar is controlled: update it from onSelect.

showFooter
boolean
true

Whether to show the footer with the Today button and the selection summary.

showOutsideDays
boolean
true

Whether to show the days of the previous and next months that fill the first and last weeks.

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

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