I have try use Filter Scopes default value for type: date, not working, but for type:text, it’s working.
example config_filter.yaml:
scopes:
InspDate:
label: Inspection Date
type: date
default: '2023-02-28" or Carbon::now()
conditions:
equals: true
between: Inspdate >= ':after' AND InspDate <= ':before'
Inspector:
label: Inspector Name
default: 'Peter Pan'
type: text
conditions: Inspector = :value
…
Even using function listFilterExtendScopes(%filter), still not working
public function listFilterExtendScopes($filter)
{
$filter->addScopes([
'InspDate' => [
'label' => 'Inspection Date',
'type' => 'date',
'default' => '2023-02-28',
],
]);
}
The type: date, I think it’s using \modiles\backend\filterwidgets\Date.php
Any one has solution?
Thanks!