Skip to content
Mizen UI
Docs

IntroductionInstallationCLIStylingFoundationsThemingCompositionIntegrationsAccessibilityFor agents

useCopyToClipboard

AccordionAspect RatioCardCollapsibleFrameGridGroupInlineScroll AreaSectionSeparatorSpacerStack

BlockquoteCitationCodeHeadingKbdLabelLinkTextVisually Hidden

ButtonButton GroupToggleToggle groupToolbar

CalendarCheckboxCheckbox groupComboboxDate pickerDate range pickerDate-Time InputFieldFieldsetFile UploadFormInputInput groupNumber fieldOTP FieldRadio groupSelectSliderSwitchTextareaTime Input

BreadcrumbMenubarNavigation MenuPaginationSegmented ControlStepperTabs

Alert dialogCommandContext MenuDialogDrawerMenuPopoverPreview CardSheetTooltip

AlertBadgeEmptyError StateMeterProgressSkeletonSpinnerStatus dotToast

Activity FeedAvatarAvatar GroupData TableListMetricOverflow ListProperty ListTableTokenTree

Area ChartBar ListCalendar HeatmapCategory ComparisonChart FrameChart LegendChart TooltipDistributionFunnelHeatmapMetric TrendPart-to-WholeProgress RingsRadar ChartRadial BarsSankey ChartScatter ChartScore GaugeTime Series

Diagram

AttachmentCarouselCode BlockLightboxMarkdownThumbnailTimestamp

Agent ThinkingApproval CardComposerConversationInline CitationMessageMessage ScrollerQuestion CardSourcesStreaming TextSuggestionTask ListTerminalTool Call

On this page

  • Preview
  • Usage
  • Examples
  • Single date
  • Date range
  • Month and year navigation
  • Recommendations
  • Usage boundaries
  • API reference

Forms

Calendar

Renders accessible single and range date selection with month navigation, disabled bounds, and locale-aware formatting.

idle

Usage

import { Calendar } from "@mizen-labs/ui";

Examples

Single date

Date range

Month and year navigation

Jump directly to a month or year using Mizen Select. Navigation bounds define the available years.

Recommendations

GuidancePractice
Do

Specify locale and unavailable dates. Use range mode when the task selects a stay or reporting interval.

Do

Use minValue, maxValue, or isDateUnavailable for real date constraints.

Usage boundaries

GuidanceBoundary
Scope

Use Date Picker for compact editable entry. Date availability and booking rules belong to the application.

API reference

Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.

PropTypeDefaultDescription
mode"single" | "range"—Selection mode for the calendar: single date selection or range selection.
valueDate | CalendarRangeValue | undefined—Controlled selection value: Date for single mode or CalendarRangeValue for range mode.
defaultValueDate | CalendarRangeValue | undefined—Initial selection value in uncontrolled mode: Date for single mode or CalendarRangeValue for range mode.
onValueChange((value: Date | undefined) => void) | ((value: CalendarRangeValue | undefined) => void)—Event handler called when date selection changes with the selected Date or CalendarRangeValue.
monthDate—Controlled month currently displayed in the calendar.
defaultMonthDateCurrent month or month of initial valueInitial month displayed when uncontrolled.
onMonthChange(month: Date) => void—Event handler called when the displayed month changes.
localeCalendarLocale—Locale object used for formatting months, weekdays, and accessible labels.
dir"ltr" | "rtl""ltr"Text and layout direction for the calendar grid and navigation.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 60 (Sunday)First day of the week, where 0 is Sunday and 1 is Monday.
autoFocusbooleanfalseAutomatically focuses the selected or initial day button on mount.
requiredbooleanfalsePrevents deselecting the current value when clicked.
disabledbooleanfalseDisables all date selection and month navigation controls.
readOnlybooleanfalsePrevents selection changes while preserving focus and keyboard navigation.
invalidbooleanfalseRenders invalid accessibility semantics and styling on the calendar root.
minValueDate—Earliest selectable date. Dates before this are disabled.
maxValueDate—Latest selectable date. Dates after this are disabled.
isDateUnavailable(date: Date) => boolean—Predicate function returning true for specific disabled dates.
minNightsnumber—Minimum number of nights required for a completed range in range mode.
maxNightsnumber—Maximum number of nights permitted for a completed range in range mode.
CalendarCalendarProps"div"Root calendar component container with owned layout and navigation slots.
CalendarRangeValue{ from: Date; to?: Date }—Range selection object with a required start date and optional end date.
captionLayout"label" | "dropdown""label"Use dropdown to navigate directly with month and year selects.
startMonthDate100 years before today in dropdown modeFirst month available for navigation. Does not change date availability.
endMonthDateEnd of the current year in dropdown modeLast month available for navigation. Does not change date availability.
PreviousToolbarNextCheckbox
October 2026
SuMoTuWeThFrSa

Single date

Selected: 2026-06-15

June 2026
SuMoTuWeThFrSa

Date range

Selected: 2026-06-10 to 2026-06-18

June 2026
SuMoTuWeThFrSa
October 2026
SuMoTuWeThFrSa