Filtering a list by date range


I’m trying to create a filter that allows the user show records over a range of dates, e.g. “last 7 days”, “last 30 days”, “last 90 days”, “yesterday”, etc.

What’s the best way to do this, or can it even be done? All the date pickers I’ve found are focused on single date filters. I can see something like this when I create a filter, but nothing for the user experience.

I’ve attached a screenshot from another app of the functionality I’m trying to replicate.

Many thanks,

Hi @EasyEast ,

You can add additional fields in users collection which can be called date filter from and date filter to, and update this fields before you show the list.

To get last 7 days, you can use start of today - 7 in “from” and current time in “to”

To get certain month, you need to have additional collection that record beginning of the month and end of the month.

This is certainly possible.

1 Like

@Yongki Thanks, I’ll try this. Appreciate the help

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.