A date picker. Stored as a Y-m-d string.
Field::date(string $key): DateField->format(string $format): staticDisplay format in the picker (PHP date format). Default: 'Y-m-d'.
->minDate(string $date): staticMinimum selectable date ('Y-m-d' or 'today').
->maxDate(string $date): staticMaximum selectable date.
->returnFormat(string $format): static| Format | Returns |
|---|---|
'' (default) |
string — '2026-06-01' |
'DateTime' |
\DateTime object or null |
'timestamp' |
int Unix timestamp |
{ "launch_date": "2026-06-01" }Field::date('launch_date')
->label('Launch Date')
->format('d/m/Y')
->minDate('today')
->returnFormat('DateTime'),@php $date = ctrlfield_get('launch_date') @endphp
{{-- With returnFormat('DateTime') --}}
@if($date)
{{ $date->format('F j, Y') }} {{-- "June 1, 2026" --}}
@endif
{{-- Raw string (no returnFormat) --}}
{{ ctrlfield_get('launch_date') }} {{-- "2026-06-01" --}}