F
Filament14mo ago
Gush

DatePicker on edit

On edit i dont want to apply ->MinDate because it would force me to update to date of edit
DatePicker::make('date')
->prefixIcon('heroicon-m-calendar-days')
->required()
->label(__('assistance.assistance_resource.date'))
->minDate(Carbon::now()->addHour()),
DatePicker::make('date')
->prefixIcon('heroicon-m-calendar-days')
->required()
->label(__('assistance.assistance_resource.date'))
->minDate(Carbon::now()->addHour()),
1 Reply
lazydog
lazydog14mo ago
Use this
->required(fn(string $context): bool => $context === 'create'),
->required(fn(string $context): bool => $context === 'create'),
Want results from more Discord servers?
Add your server