reactivesearch icon indicating copy to clipboard operation
reactivesearch copied to clipboard

DateRangeSensor fails to get results when start & end dates are the same

Open alexlle opened this issue 7 years ago • 7 comments

Issue Type: bug

Platform: ReactiveSearch for Web

Description:

Screenshots: imagen

Minimal reproduction of the problem with instructions: When I filter through DateRangeSensor and set the same day for start date & end date, It's doesn't respond with any results. But there are items for that particular date. If I try that date and beyond, I do get the results.

alexlle avatar Jan 11 '19 21:01 alexlle

Hi @jyash97, can you give this a spin and check what could possibly be an issue here?

metagrover avatar Jan 14 '19 17:01 metagrover

Hey @alexislorenzo @metagrover

I tried this, but I wasn't able to replicate the issue. Check this demo I am getting results on same start & end date: daterange- same start end date

Also I am getting results in dejavu image

jyash97 avatar Jan 15 '19 07:01 jyash97

Hi @alexislorenzo, if you can share a codesandbox replication of your issue, we can help you debug.


@jyash97 It would be best if you can also share the code for the above working demo for reference.

metagrover avatar Jan 15 '19 10:01 metagrover

Sure, Check the link for the above demo.

jyash97 avatar Jan 15 '19 12:01 jyash97

Hi, thanks for responding. I'll try to upload a replica to codesandbox. Meanwhile, I think it may have something to do with date format. I'm using date_time_no_millis because that's the date format of the source Is there a way to transform the date format before it's used by the datafield parameter in the DateRange component?

alexlle avatar Jan 16 '19 21:01 alexlle

Finally, I got a kind of workaround. I updated every single doc and added a text field based on the original date field for each doc, with the format YYYYmmdd, so the datafield for the component is this new one with format basic_date.

alexlle avatar Jan 24 '19 17:01 alexlle

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 06 '19 10:08 stale[bot]