Can instantsearch.js@4.0.0 now filter by date ranges?

Upgraded to instantsearch.js@4.0.0 ; can I search between date ranges now, or do we still have to do the odd numeric workaround?

Thanks!

Hi @michael2,

can I search between date ranges now, or do we still have to do the odd numeric workaround?

Thanks for contacting Algolia. Are you asking if you can search for a date in human-readable format (i.e., "February 20, 2020") or if you still need it to be a UNIX timestamp (i.e., 1582231127)?

Algolia still relies on searching for the numeric timestamp: https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/in-depth/what-is-in-a-record/#dates

Please let us know if this is not what you were looking for!

If I store the data as Unix timestamps, will I be able to convert the labels, on let’s say a slider, to something friendlier?

Hi @michael2 ,

Good question.

If I store the data as Unix timestamps, will I be able to convert the labels, on let’s say a slider, to something friendlier?

Yes, you do any manipulation you would like on the frontend to transform into a format other than the UNIX timestamp but it would be handled by your custom code.

NOTE: we do not offer an official date range widget, but other Algolia-related projects have created custom widgets, see this thread:

Does that make sense? I hope it helps.