Filter by days/months since against date field with InstantSearch

Is there a way to filter on a Date attribute using a rangeSlider where user can select days or months since on Instantsearch.js?

For example if I select 0 to 12 months, is there a way to convert that range to dates for the query.

Hi @dan3,

You can use date to filter your results with Algolia but the attribute that store those dates must be a timestamp. You can find more information about that in the documentation.

Once the value for the records are integers you can use the RangeSlider to filter them.You can use the tooltips option to format the data that will be displayed. Here is an example with a price attribute but the concept remains the same for dates.

Hope that helps, let me know if you have questions.