Skip to content

Commit

Permalink
Fix datepicker filter (#1379)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev authored Feb 3, 2024
1 parent 7fd887c commit f291b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Components/Filters/Builders/DatePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Filters/Builders/DateTimePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit f291b19

Please sign in to comment.