diff --git a/src/Components/Filters/Builders/DatePicker.php b/src/Components/Filters/Builders/DatePicker.php index dc29d934..e0130f4e 100644 --- a/src/Components/Filters/Builders/DatePicker.php +++ b/src/Components/Filters/Builders/DatePicker.php @@ -14,7 +14,7 @@ public function builder(EloquentBuilder|QueryBuilder $builder, string $field, in return; } - if (!isset($values['start']) || isset($values['end'])) { + if (!isset($values['start']) && !isset($values['end'])) { return; } @@ -38,7 +38,7 @@ public function builder(EloquentBuilder|QueryBuilder $builder, string $field, in public function collection(Collection $collection, string $field, int|array|string|null $values): Collection { - if (!isset($values['start']) || isset($values['end'])) { + if (!isset($values['start']) && !isset($values['end'])) { return $collection; } diff --git a/src/Components/Filters/Builders/DateTimePicker.php b/src/Components/Filters/Builders/DateTimePicker.php index cf0de340..34f82f38 100644 --- a/src/Components/Filters/Builders/DateTimePicker.php +++ b/src/Components/Filters/Builders/DateTimePicker.php @@ -14,7 +14,7 @@ public function builder(EloquentBuilder|QueryBuilder $builder, string $field, in return; } - if (!isset($values['start']) || isset($values['end'])) { + if (!isset($values['start']) && !isset($values['end'])) { return; } @@ -38,7 +38,7 @@ public function builder(EloquentBuilder|QueryBuilder $builder, string $field, in public function collection(Collection $collection, string $field, int|array|string|null $values): Collection { - if (!isset($values['start']) || isset($values['end'])) { + if (!isset($values['start']) && !isset($values['end'])) { return $collection; }