FilamentF
Filament16mo ago
Matthew

datepicker initial date

Should be easy, but I can't find a way to set the landing date of the datepicker, trying:

            DatePicker::make('uc_dob')
                ->required()
                ->label('Date of Birth')
                ->displayFormat(Date::FORMAT_DATE_HUMAN)
                ->default(now()->subYears(45))
                ->visible(fn ($record) : bool => $record->uc_dob == false)
                ->minDate(now()->subYears(90))
                ->maxDate(now()->subYears(18)),

I've checked uc_dob is null

Thanks
Was this page helpful?