DatePicker Component

A flexible date picker component with various configuration options.

Basic Usage

The standard DatePicker with default configuration.

Date Constraints

Restrict selectable dates with min/max dates and disabled dates.

Min and Max Dates

Only dates between 7/11/2025 and 8/12/2025 are selectable

Disabled Specific Dates

Some specific dates are disabled

Disabled Days of Week

Weekends (Saturday and Sunday) are disabled

Combined Constraints

All constraints applied together

Formatting and Display

Customize the appearance and behavior of the DatePicker.

Custom Date Format

Displays date in MM/DD/YYYY format

With Week Numbers

Shows ISO week numbers in the calendar

Non-Clearable

Cannot clear the selected date

Different Sizes

Date Range Example

Using two DatePickers to create a date range selector.

Start Date

End Date

API Reference

Complete documentation of the DatePicker component props.

DatePicker Props

PropDescriptionTypeDefault
valueCurrently selected date (controlled)Date | undefined-
defaultValueDefault selected date (uncontrolled)Date | undefined-
onChangeCallback when date selection changes(date: Date | undefined) => void-
placeholderText to display when no date is selectedstring"Select date"
formatFormat for displaying the selected datestring"yyyy-MM-dd"
minDateMinimum selectable dateDate-
maxDateMaximum selectable dateDate-
disabledDatesArray of specific dates to disableDate[]-
disabledDaysOfWeekArray of days of week to disable (0-6)number[]-
showWeekNumbersWhether to show week numbersbooleanfalse
clearableWhether to show a clear buttonbooleantrue
sizeSize of the date picker component"sm" | "md" | "lg""md"