Skip to content

[Bug]: Date filters not correct after reload #1954

@edwinvdpol

Description

@edwinvdpol

What happened?

Date filters are changed on page reload.

How to reproduce the bug

When you set a date filter, and you refresh the page, the date filter changes to the default value instead the one from the URL.

This is how I set the filter:

DateFilter::make('Start Date')
    ->config(['max' => '2024-09-18'])
    ->setFilterDefaultValue(Date::today()->subDays(90)->toDateString()),

When the filter is set to for example: 2024-01-01 (visible in the URL), it shouldn't apply the default value.

Package Version

3.4.20

PHP Version

8.2.x

Laravel Version

11.22.0

Alpine Version

3.13.10

Theme

Bootstrap 4.x

Notes

No response

Error Message

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions