Basic DatePicker
Types
Sizes
With Icons
Min/Max Date
Time Options
Time Increments
Time Range
Disable/Enable Dates
Custom Format
Alt Input
Inline Calendar
Week Numbers
Themes
Localization
States
This field is required
Advanced Options
DatePicker Component
A powerful and flexible date/time picker component built on Flatpickr. Supports multiple date selection modes, themes, localization, and extensive customization options.
Basic Props
name- string (required) - Input namelabel- string - Label textvalue- string - Default valueplaceholder- string - Placeholder textid- string|null - Custom IDhint- string - Helper text
Type & Format
type- string - 'date' | 'datetime' | 'time' | 'range' | 'multiple'format- string - Custom date format (e.g., 'd/m/Y', 'F j, Y')defaultDate- string - Default selected date
Date Constraints
minDate- string - Minimum selectable datemaxDate- string - Maximum selectable datedisable- array - Dates to disableenable- array - Only enable these dates
Time Options
enableTime- bool - Enable time selectiontime24hr- bool - 24-hour formattimeFormat- string - Custom time formatenableSeconds- bool - Show secondsnoCalendar- bool - Time only, no calendarhourIncrement- int - Hour step (e.g., 2)minuteIncrement- int - Minute step (e.g., 15)defaultHour- int - Default hour (0-23)defaultMinute- int - Default minute (0-59)minTime- string - Minimum time (e.g., '09:00')maxTime- string - Maximum time (e.g., '18:00')
Display Options
size- string - 'sm' | 'lg' | nullicon- string|null - FontAwesome icon nameiconPosition- string - 'left' | 'right'theme- string|null - Theme name or 'auto'locale- string|null - Locale code (e.g., 'tr', 'de', 'fr')altInput- bool - Show alternative readable inputaltFormat- string - Format for alt inputinline- bool - Inline calendarstatic- bool - Static calendarweekNumbers- bool - Show week numbersposition- string - 'auto' | 'above' | 'below'
Behavior Options
allowInput- bool - Allow manual input (default: true)clickOpens- bool - Open on click (default: true)disableMobile- bool - Disable native mobile picker
States
error- bool - Error stateerrorMessage- string - Error messagedisabled- bool - Disabled statereadonly- bool - Readonly staterequired- bool - Required field
Advanced
options- array - Flatpickr advanced options
Available Themes
- •
light- Default light theme - •
dark- Dark theme - •
material_blue- Material Blue - •
material_green- Material Green - •
material_orange- Material Orange - •
material_red- Material Red - •
airbnb- Airbnb theme - •
confetti- Confetti theme - •
auto- Auto (dark/light based on system)
Date Format Examples
- •
Y-m-d- 2024-12-25 - •
d/m/Y- 25/12/2024 - •
F j, Y- December 25, 2024 - •
Y-m-d H:i- 2024-12-25 14:30 - •
h:i K- 02:30 PM
Common Use Cases
Basic Date Selection:
<x-datepicker name="date" label="Select Date" />
Date Range:
<x-datepicker name="range" type="range" label="Date Range" />
DateTime with Constraints:
<x-datepicker
name="datetime"
type="datetime"
min-date="today"
min-time="09:00"
max-time="18:00"
label="Business Hours"
/>
Localized DatePicker:
<x-datepicker name="date" locale="tr" label="Tarih Seçin" />