Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple date filter from store not working #619

Open
ericuldall opened this issue Feb 25, 2022 · 0 comments
Open

Simple date filter from store not working #619

ericuldall opened this issue Feb 25, 2022 · 0 comments

Comments

@ericuldall
Copy link

ericuldall commented Feb 25, 2022

I have a basic events structure with a start/end date and i'm trying to filter it in the store:

                return this.findEventsInStore({
                    query: {
                        $limit: this.pagination.perPage,
                        start: {
                            $gte: this.start
                        }
                    }
                });

this.start = Tue Feb 01 2022 00:00:00 GMT-0800 (Pacific Standard Time) as a Date object

current state for events in store:

{ "total": 1, "limit": 5, "skip": 0, "data": [ { "title": "Test Event", "description": "Testing...",  "start": "2022-02-25T01:30:00.000Z", "end": "2022-02-25T06:30:00.000Z"} ]

It will return all events in the store if I remove the start: { $gte } filter, however when filtering by start date it returns and empy result set. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant