Skip to content

Commit

Permalink
Correctly populate date values
Browse files Browse the repository at this point in the history
  • Loading branch information
afonic committed Nov 5, 2024
1 parent d947a7f commit 3c4bdce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/Livewire/Traits/IsLivewireFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3c4bdce

Please sign in to comment.