Skip to main content
Version: 1.0.3

Date Picker

The DatePicker component is a flexible and feature-rich date selection component that supports both single date selection and date range selection. It includes multiple themes, color schemes, animations, and extensive customization options.

Variant

Size

Color Scheme

Popup Position

Interactive playground - customize using controls above

Installation

ignix add component datePicker

Usage

Import the component:

import { DatePicker } from '@ignix-ui/datepicker';

Basic Date Picker

Choose your appointment date

Range Date Picker

Choose start and end dates

Size Variants

Small

Medium (Default)

Large

Extra Large

Color Schemes

Theme Mode

Blue

Green

Purple

Orange

Slate

Rose

Bottom Left

Bottom Right

Top Left

Top Right

Left

Right

💡 Tip: The popup position automatically adjusts on small screens to ensure calendar visibility

Controlled & Uncontrolled

The DatePicker can be used in both controlled and uncontrolled modes:

Hotel Booking Example

Choose check-in and check-out dates (weekends are unavailable)

Validation Examples

Required Field

This field must be filled

Min/Max Date Constraints

Dates between 5/20/2026 and 5/27/2026

Disabled Dates

2nd and 4th from today are unavailable

Error State

Invalid date selected

Controlled Usage

Single Date Picker

Date is controlled by React state

Selected: No date selected

Range Date Picker

Range is controlled by React state

Selected Range:

Start: Not selected

End: Not selected

Props

Core Props

PropTypeDefaultDescription
variant'single' | 'range''single'Date selection mode
valueDate | DateRange-Selected date(s)
onChange`(date: DateDateRange) => void`-
onError`(error: stringnull) => void`-

Configuration

PropTypeDefaultDescription
placeholderstring '| [string, string]'Select date'Input placeholder text
formatDateFormat'MM/DD/YYYY'Date display format
size'sm' | 'md' | 'lg' | 'xl''md'Component size
disabledbooleanfalseDisable the date picker
readOnlybooleanfalseMake the input read-only
requiredbooleanfalseMake selection required
minDateDate-Minimum selectable date
maxDateDate-Maximum selectable date
disabledDatesDate[]-Array of disabled dates
highlightDatesDate[]-Array of highlighted dates
allowEmptybooleanfalseAllow clearing selected date
todayButtonbooleantrueShow "Today" button in calendar
clearButtonbooleantrueShow "Clear" button in calendar
autoClosebooleanfalseAuto-close calendar after selection
validateOnChangebooleantrueValidate on date change

Styling & UI

PropTypeDefaultDescription
themeMode'light' | 'dark''light'Theme mode
colorScheme'blue' | 'green' | 'purple' | 'orange' | 'rose' 'blue'Color scheme
popupPositionPopupPosition'bottom-left'Calendar popup position
showIconbooleantrueShow calendar icon
iconReact.ReactNode<Calendar />Custom icon component
classNamestring-Container CSS classes
inputClassNamestring-Input CSS classes
calendarClassNamestring-Calendar CSS classes
labelstring-Input label
helperTextstring-Helper text below input

Validation & Error

PropTypeDefaultDescription
errorbooleanfalseError state
errorMessagestring-Error message to display

Internationalization

PropTypeDefaultDescription
weekStart0 | 10Week start day (0=Sunday, 1=Monday)
monthNamesstring[]MONTH_NAMESCustom month names
dayNamesstring[]DAY_NAMESCustom day names
todayTextstring'Today'Today button text
clearTextstring'Clear'Clear button text