From 3c4bdcef50eb6c129a74386cf3a8ddb83a1f9909 Mon Sep 17 00:00:00 2001 From: Iosif Chatzimichail Date: Tue, 5 Nov 2024 20:10:39 +0200 Subject: [PATCH] Correctly populate date values --- src/Http/Livewire/Traits/IsLivewireFilter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Http/Livewire/Traits/IsLivewireFilter.php b/src/Http/Livewire/Traits/IsLivewireFilter.php index 4d04175..b452ee5 100644 --- a/src/Http/Livewire/Traits/IsLivewireFilter.php +++ b/src/Http/Livewire/Traits/IsLivewireFilter.php @@ -73,6 +73,11 @@ protected function getParamKey() $minModifier = 'gte'; $maxModifier = 'lte'; + if ($this->statamic_field['type'] === 'date') { + $minModifier = 'is_after'; + $maxModifier = 'is_before'; + } + if ($this->modifier !== 'any') { [$minModifier, $maxModifier] = explode('|', $this->modifier); }