When using a date filter on a column bound to a DateTime value the value submitted is truncated and doesn't contain the time zone information.
c.Bound(x => x.Created)
.Filterable(f => f
.Operators(o => o.ForDate(d => d.Clear().IsGreaterThanOrEqualTo(
"On or after"
).IsLessThan(
"Before"
)))
.Extra(
true
)
.UI(GridFilterUIRole.DateTimePicker)
);
If the user selects 2/5/2021 12:00 PM and (for example) the users time zone is Australia/Sydney, the following is send with the request:
filter: Created~gte~datetime'2021-02-05T12-00-00'
As the time zone information is omitted model binding assumes this is a local time in the time zone the server is operating in.
See also https://github.com/telerik/kendo-ui-core/issues/5737 (which was erroneously closed) and https://github.com/telerik/kendo-ui-core/issues/5306 (which has been open for over a year).
Using:
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2021.1.119" />
"@progress/kendo-theme-bootstrap": "^4.30.0",
"@progress/kendo-theme-default": "^4.32.0",
"@progress/kendo-ui": "^2021.1.119",