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 Methods (Fluent)
| Method / Property | Parameters | Description |
|---|---|---|
$m->datepicker($id) | string | Create a DatePicker component. |
->value($value) | ?string | Set the initial date value (Y-m-d format). |
->placeholder($text) | string | Set placeholder text. |
->name($name) | string | Form field name. |
->min($date) | string | Earliest selectable date (Y-m-d). |
->max($date) | string | Latest selectable date (Y-m-d). |
->format($format) | string | Date format string (default: Y-m-d). |
->disabled($dis) | bool | Disable the datepicker. |
->showTodayButton($show) | bool | Show a "Today" shortcut button in the calendar (default: true). |
->highlightToday($hl) | bool | Highlight today's date in the calendar (default: true). |
JS JS Methods
| Method / Property | Parameters | Description |
|---|---|---|
m.datepicker(id, opts) | string, ?object | Get or create DatePicker instance. |
value(val) | ?string | Get or set the current date. Omit parameter to get. |
min(val) | string | Set minimum date constraint. |
max(val) | string | Set maximum date constraint. |
enable() | | Enable the datepicker. |
disable() | | Disable the datepicker. |