- ABP Framework version: v7.4.0
- UI Type: Blazor WASM
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): microservices
- Exception message and full stack trace:
- Steps to reproduce the issue:
- Generate crud form with abp suite with DateTime properties
- The suite will generate Advanced Filters with DateTime Pickers
- Select the date for instance 18.10.2023
- But the request parameter in the api will be a different date. In my case is minus one date i.e. 17.10.2023
6 Answer(s)
-
0
Hi,
I think the data result is no problem, right?
-
0
Hi,
What do you mean data result is correct? The problem is that I request wrong filtering conditions from the backend. On UI you see one date, but the backend results will be provided based on different dates.
-
0
Hi,
Because the time of the parameter is UTC time.
What do you mean data result is correct
I mean, when you search, the data of 17.10.2023 time will not appear, right?
-
0
Hi,
Actually I've searched for date ranges DateMin and DateMax. For DateMin is not a problem because the 17.10.2023 is less than 18.10.2023, but for DateMax if I use 18.10.2023 then the api request will contain the interval between 17.10.2023 and 17.10.2023. That means that the records with date 18.10.2023 will not be returned. In such way filtering will not work properly.
Steps to reporduce:
- Add record with date 18.10.2023
- Select for DateMin 18.10.2023
- Select for DateMax 18.102023 Expected result:
- record will be in the list Actual result
- record is not in the list
I hope I am more explicit now.
Thanks
-
0
I will check it
-
0
Hi,
Yes, it's a problem. We will enhance the ABP suite:
You can consider:
protected virtual async Task OnDateMaxChangedAsync(DateTime? dateMax) { Filter.DateMax = dateMax == null ? null : dateMax.Value.Date.AddDays(1).AddSeconds(-1); await SearchAsync(); }