DatePicker

Calendar-based date selector with min/max constraints, Today button, and keyboard navigation.

Basic DatePicker

With Min/Max Range

Pre-populated with Today Button

Disabled

Pick a date to see output...
PHP

PHP PHP Methods (Fluent)

Method / PropertyParametersDescription
$m->datepicker($id)stringCreate a DatePicker component.
->value($value)?stringSet the initial date value (Y-m-d format).
->placeholder($text)stringSet placeholder text.
->name($name)stringForm field name.
->min($date)stringEarliest selectable date (Y-m-d).
->max($date)stringLatest selectable date (Y-m-d).
->format($format)stringDate format string (default: Y-m-d).
->disabled($dis)boolDisable the datepicker.
->showTodayButton($show)boolShow a "Today" shortcut button in the calendar (default: true).
->highlightToday($hl)boolHighlight today's date in the calendar (default: true).

JS JS Methods

Method / PropertyParametersDescription
m.datepicker(id, opts)string, ?objectGet or create DatePicker instance.
value(val)?stringGet or set the current date. Omit parameter to get.
min(val)stringSet minimum date constraint.
max(val)stringSet maximum date constraint.
enable()Enable the datepicker.
disable()Disable the datepicker.