malzariey / filament-daterangepicker-filter

MIT License
79 stars 39 forks source link

auto setting datetime format when time picker is enabled #82

Open Aamish26622 opened 2 months ago

Aamish26622 commented 2 months ago

Previously when enabling timepicker, the $data did not included the time values nor the time was displayed on frontend unless we manually call displayFormat() and set the format accordingly.

Ideally, when one used timepicker() function on the DateRangePicker, it should automatically format it according (unless they have manully called displayFormat()).

This PR fixes that by check different timpicker functions being called and adjust the format with some dafault ones on when displayFormat isnt called manually (this will ensure any backwards compatibility issue for exisiting users).

note: Its my first ever opensource PR so let me know if there is something else required in the process