Form component Datepicker. Add option to add clear input button #10643
CodeTechNL
started this conversation in
Ideas
Replies: 4 comments 1 reply
-
|
up |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
A little late but I hope it can help other devs. You can archive this by using the suffixAction and a custom action Forms\Components\DatePicker::make('expires_at')
->native(false)
->suffixAction(
Forms\Components\Actions\Action::make('clear')
->action(fn(Forms\Set $set) => $set('expires_at', null))
->tooltip('Clear Expiration Date')
->icon('heroicon-o-x-mark')
->label('Clear'))Then you will see: |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@danharrin |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
+1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
When you have a optional date field, it's not user friendly to clear the input data. A small X button or 'remove' button would be handy
Beta Was this translation helpful? Give feedback.
All reactions