How to enable/disable field when another field is null/filled

DateTimePicker::make('starts_at'),
DateTimePicker::make('ends_at')
->disabled(fn (Get $get): bool => empty($get('starts_at'))),
DateTimePicker::make('starts_at'),
DateTimePicker::make('ends_at')
->disabled(fn (Get $get): bool => empty($get('starts_at'))),
Solution:
starts_at should be ->live()
Jump to solution
2 Replies
Solution
LeandroFerreira
LeandroFerreira12mo ago
starts_at should be ->live()
@nasilemak
@nasilemakOP12mo ago
That did the trick! Cheers!

Did you find this page helpful?