How to add button to Datetimepicker?
Hello,
I have a datetimepicker added to one of my forms and I am looking to add a button to click when I am done selecting date and time.
The default datetimepicker lets us select the date and time and then we have to click away to be able to update the input, also there is an option to close it automatically after date and time selection, but what I need is to add a button to update the input and close the picker.
Please let me know is it possible to do so?
Thank you

5 Replies
this is not a filament specific thing, it is just the default HTML Datepicker behavior
But I think filament has a ready to use method that may help you:
https://filamentphp.com/docs/3.x/forms/fields/date-time-picker#closing-the-picker-when-a-date-is-selected
@Mohamed Ayaou thank you for the reply, the closeOnDateSelection only works when there is no time involved in the picker.
bump
You need some javascript to edit the html input behaviour, just search for it and inject it with filament assets
@Mohamed Ayaou thank you, I will try it this way.