malzariey / filament-daterangepicker-filter

MIT License
79 stars 39 forks source link

Improvements #45

Closed noxoua closed 9 months ago

noxoua commented 10 months ago

I noticed that these hasTime, hasDate, hasSeconds functions are used in file DateRangePicker, but never were declared. So when I pass null ->format(null) an exception is thrown.

Screenshot 2023-09-16 at 11 21 52

Changes:

  1. Removed calls to functions that do not exist hasTime, hasDate, hasSeconds.
  2. Added a label for the selected range. (does not affect the state, only visual). ->useRangeLabels()

https://github.com/malzariey/filament-daterangepicker-filter/assets/142592979/8e6fc85b-35fb-4082-8383-5e50876f78a0

  1. added separator option. ->separator(' - ')
  2. added an option to disable custom range. ->disableCustomRange()
  3. formatted the daterangepicker.js file a little.
  4. added the hiddenLabel option to filter
  5. added the placeholder option to filter
malzariey commented 9 months ago

Thanks for your great addition.