Dear Colleagues,
In my gallery is use two DatePickers with the help of this function:
Sort(Filter(Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis"); Utworzony >= DatePicker1.SelectedDate &&
Utworzony <= DatePicker2.SelectedDate); Utworzony; If(SortDescending2;Descending;Ascending))
DatePicker1 is a date FROM DatePicket2 is a date TO.
So i can filter using them different date ranges.
In DatePicker1 default value I set Blank(). This is great because it is setting the date as 31.12.2001.
In DatePicker2 default value I set Today()
Now when I open my gallery. It shows data one day behind. For example if Today() is 23.09.2020 - my gallery will show date up to 22.09.2020. When I change Today() to 24.09.2020 it will show the data from 23.09.2020.
I found this topic:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Datepicker-returns-minus-1-day/td-p/3807/pag...
and followed this advice:
Hi, I encountered this too when my datepicker is set to UTC. OnVisible, it is set to 'TODAY', but it will always return the current date minus 1. So here is the workaround that I did, I set the default value of the datepicker to 'SelectedEventDate' and placed the code below on the OnVisible property of the screen:
UpdateContext({SelectedEventDate: DateValue(Text(Today(),DateTimeFormat.UTC))+1 })
but it works partially - it is by default setting a DatePicker2 one day ahead. So with this function Today() is 24.09.2020. It shows all records but if user change DatePicker to 23.09.2020 it will be once again missing some data.
Using DatePickers like that will be really confusing. My users will have to be aware that the filter is one day off.
Is there any workaround?
Please kindly advise if there is any solution.
Utworzony is a CreatedBy from Sharepoint list:
