Table with column filter on created_at #2276
Replies: 3 comments
-
I'm sorry to bother further, can someone please provide some help? |
Beta Was this translation helpful? Give feedback.
-
I've been able to have a filter for a date column using TD::make('created_at', 'Delivered')
->filter(TD::FILTER_DATE_RANGE) in |
Beta Was this translation helpful? Give feedback.
-
Just an idea: Since the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @tabuna,
I'm trying to add a filter in a table for the column
created_at
.This is what I tried so far, following docs, but without any success.
Column
created_at
is the Laravel's standard created in migration with:This is the relevant parts of the
Order
model:This is the
app/Orchid/Screens/OrderListScreen.php
file:Here's
app/Orchid/Filters/DateFilter.php
:I'm trying to use the filter in
OrderListLayout
which extendsTable
like this:This is what I get by calling the model with
?filter[created_at]=17-06-2022
as parameter (i.e. choosing a date in datepicker and clickngApply
):As you can see from the last row visible, filter is not working. If you look at the debugger, there's no query on
created_at
column (except for sorting use).Could you please provide some help on filtering a Date column?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions