Date Filter Validation

->form([ Section::make('Search') ->schema([ DatePicker::make('from') ->label('Start Date')->format('Y-m-d')->reactive(), DatePicker::make('to')->reactive()->label('End Date')->format('Y-m-d') ->maxDate(function ($get) { return $get('from')->addDays(93); }) ])->columns(2), ]) In maxDate need to add 90 days with from date Kindly advise me how to do.........
2 Replies
Tin
Tin2y ago
can you compose a validation string there. Something like 'required|before:'.now()->addMonths(3)->toDateString or use today() instead of now()
Hemanath
HemanathOP2y ago
Thanks you ..I will try
Want results from more Discord servers?
Add your server