evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
3.65k stars 178 forks source link

[Bug]: DateRange single date selection and selection of date beyond today #2070

Open jaroet opened 3 weeks ago

jaroet commented 3 weeks ago

Describe the bug

Issue 1 I can not select only one day through the datarange component. I have a daterange compenent and when I filter 3 and 4 june I get 2 found. When I hit june 3rd two times (once for start and once for end) I see the components gets updated but no results. The same for june 4th. While both do give results. Something strange in that.

Issue 2 I cannot select a date after the current date. While it might seem not logical to select a date beyond the current date there are plenty of examples why you would want to do that. For example select all issues you need to fix between last week and end of month. It would be nice if you could lift that restriction on the datepicker in the datarange component.

Steps to Reproduce

mentioned above.

Logs

No response

System Info

MacOS and Evidence 36.0.0

Severity

annoyance

Additional Information, or Workarounds

No response

kwongz commented 1 week ago

Hi, Thank you for your comment.

I may be misunderstanding, but I wasn't able to reproduce the issues. I've added some information on how I was able to work with this, if this doesn't work for you could you provide more examples?

Issue 1: Single day Filtering Query with updated BarChart

Source Code for what is pictured below

image

Issue 2: Adding End date to go beyond current day

https://docs.evidence.dev/components/date-range/#manually-specifying-a-range

jony1993 commented 1 week ago

I first thought that for me when selecting a day (by clicking twice on the day) or a date range, wrong date value is used in the query

2024-06-22_12-06-21

But I think the date range component returns utc date.

jony1993 commented 6 days ago

Regarding Issue 1: I can select a single day, but not the current one. Here's a video demonstrating the issue: https://github.com/evidence-dev/evidence/assets/11912368/9a2ae993-52f9-4a9b-af97-877776d5d917

@jaroet as mentioned earlier: If your browser is in a different time zone than UTC, the range selection will be incorrect regardless. This is another bug