Skip to main content
The date-time picker component provides an interface for selecting dates and times.

Basic Usage

use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\TimePicker;

// Date and time
DateTimePicker::make('published_at')

// Date only
DatePicker::make('date_of_birth')

// Time only
TimePicker::make('alarm_at')

Available Methods

native
method
Controls whether to use native HTML5 picker or JavaScript picker.
DatePicker::make('date_of_birth')
    ->native(false) // Use JavaScript picker
format
method
Sets the storage format.
DatePicker::make('date_of_birth')
    ->format('d/m/Y')
displayFormat
method
Sets the display format (JavaScript picker only).
DatePicker::make('date_of_birth')
    ->native(false)
    ->displayFormat('d/m/Y')
timezone
method
Sets the timezone.
DateTimePicker::make('published_at')
    ->timezone('America/New_York')
locale
method
Sets the locale (JavaScript picker only).
DatePicker::make('date_of_birth')
    ->native(false)
    ->locale('fr')
seconds
method
Controls seconds display.
DateTimePicker::make('published_at')
    ->seconds(false)
date
method
Controls date display.
DateTimePicker::make('event_time')
    ->date(false) // Time only
time
method
Controls time display.
DateTimePicker::make('event_date')
    ->time(false) // Date only
minDate
method
Sets the minimum selectable date.
DatePicker::make('date_of_birth')
    ->minDate(now()->subYears(150))
    ->maxDate(now())
maxDate
method
Sets the maximum selectable date.
DatePicker::make('event_date')
    ->minDate(now())
    ->maxDate(now()->addYear())
disabledDates
method
Disables specific dates (JavaScript picker only).
DatePicker::make('appointment')
    ->native(false)
    ->disabledDates(['2024-12-25', '2024-01-01'])
defaultFocusedDate
method
Sets the default focused date (JavaScript picker only).
DatePicker::make('event_date')
    ->native(false)
    ->defaultFocusedDate(now()->startOfMonth())
firstDayOfWeek
method
Sets the first day of week (0-7, JavaScript picker only).
DatePicker::make('date')
    ->native(false)
    ->firstDayOfWeek(7) // Sunday
weekStartsOnMonday
method
Sets Monday as first day of week.
DatePicker::make('date')
    ->native(false)
    ->weekStartsOnMonday()
weekStartsOnSunday
method
Sets Sunday as first day of week.
DatePicker::make('date')
    ->native(false)
    ->weekStartsOnSunday()
hoursStep
method
Sets the hours increment step.
DateTimePicker::make('appointment')
    ->native(false)
    ->hoursStep(2)
minutesStep
method
Sets the minutes increment step.
DateTimePicker::make('appointment')
    ->native(false)
    ->minutesStep(15)
secondsStep
method
Sets the seconds increment step.
DateTimePicker::make('precise_time')
    ->native(false)
    ->secondsStep(10)
closeOnDateSelection
method
Closes picker when date is selected.
DatePicker::make('date')
    ->native(false)
    ->closeOnDateSelection()
datalist
method
Adds datalist suggestions (native picker only).
TimePicker::make('appointment_at')
    ->datalist(['09:00', '09:30', '10:00', '10:30'])
prefix
method
Adds text before the input.
DatePicker::make('date')
    ->prefix('Starts')
suffix
method
Adds text after the input.
DatePicker::make('date')
    ->suffix('at midnight')
prefixIcon
method
Adds an icon before the input.
use Filament\Support\Icons\Heroicon;

TimePicker::make('at')
    ->prefixIcon(Heroicon::Clock)
readOnly
method
Makes the input read-only (native picker only).
DatePicker::make('created_at')
    ->readOnly()

Common Patterns

Date of Birth

DatePicker::make('date_of_birth')
    ->native(false)
    ->maxDate(now())
    ->displayFormat('d/m/Y')
    ->required()

Published At Timestamp

DateTimePicker::make('published_at')
    ->native(false)
    ->seconds(false)
    ->default(now())

Appointment Scheduler

DateTimePicker::make('appointment_at')
    ->native(false)
    ->minDate(now())
    ->maxDate(now()->addMonths(3))
    ->minutesStep(15)
    ->seconds(false)
    ->required()

Event Date Range

DatePicker::make('starts_at')
    ->native(false)
    ->minDate(now())
    ->required()

Build docs developers (and LLMs) love