Skip to content

Commit

Permalink
fix(filters): fix date filter (#1152)
Browse files Browse the repository at this point in the history
* fix(filters): fix date filter

fix "Undefined array key 1" when user did not select second date

* pint

---------

Co-authored-by: luanfreitasdev <[email protected]>
  • Loading branch information
jamesRUS52 and luanfreitasdev authored Sep 15, 2023
1 parent 995c744 commit 79da200
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Traits/HasFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ public function datePickerChanged(
string $type,
string $timezone = 'UTC',
): void {
if (!isset($selectedDates[1])) {
return;
}

$this->resetPage();

$input = explode('.', $wireModel);
Expand Down

0 comments on commit 79da200

Please sign in to comment.