Issue with dates in Telerik's grid (admin)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I agree the Uri part is a hack otherwise we'd have to create a converter for each object type returned. Or use another serializer such as Json.Net. I also need to test this using other browsers than IE (not done yet) in case the Date implementation behaves differently when passed a date string (ISO 8601).
10 years ago
I guess Telerik's Grid will only convert DateTime from Utc to client time only when the DateTimeKind is Utc.

So I replace the code in controller
_dateTimeHelper.ConvertToUserTime(dataTime, DateTimeKind.Utc)
with
_dateTimeHelper.ConvertToUserTime(dataTime, TimeZoneInfo.Utc, TimeZoneInfo.Local)

It works for me.
10 years ago
jemmylu wrote:
I guess Telerik's Grid will only convert DateTime from Utc to client time only when the DateTimeKind is Utc.

So I replace the code in controller
_dateTimeHelper.ConvertToUserTime(dataTime, DateTimeKind.Utc)
with
_dateTimeHelper.ConvertToUserTime(dataTime, TimeZoneInfo.Utc, TimeZoneInfo.Local)

It works for me.


Thanks ... It also works for me. Simple solution...
7 years ago
And finally we have solved this issue.
You can see changes in this commit.
Please test it and let us know if there are any problems.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.