DateConstraint
I am trying to build a filter using QueryBuilder. I am trying to use a DateConstraint in which I want to filter by Date time.
It is cast as datetime in the model. But the option for setting the filter value, provides only the date option, no time option is available. Further it seems that the form uses the native datepicker. Is there a way to set both date & time and the javascript based datepicker.
Thanks in advance for any help.
3 Replies
I believe that you are trying to achieve something like this:
The example follows the one provided in the docs: https://filamentphp.com/docs/3.x/tables/filters/custom
In order to use the JS-based date picker I believe you can add ->native(false) to the DatePickers
Thanks. But that's not using the DateConstraint. This is creating each filter separately. Then we can only use the "and" operations. I find the query builder is much more flexible. Of course, if I am unable to find a solution I will probably go back to a similar solution.