Hello,
we ran into the issue when grid automatically convert datetime to local one, but in popup for explme we have a form with standard DateTime picker which does not do that, as a result of it we have diff dates in grid & in the popup when we edit the grid row.
are there any solution we can use to make it consistent? The preferable will be DateTime picker behavior when date is displayed as it is
Thx Alex
4 Answers, 1 is accepted
0

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
answered on 29 Jul 2018, 11:27 AM
solution was found, but it is so wired that Telerik could not implement it, i read a lot of post where it was explained that it will affect existing clients, but ...... just leave this behavior as default and let us ability by setting some property have the dates in UTC.
0
Hello Alex,
By default when a date is returned from the server the browser will apply an offset to it corresponding to the current client-side time zone. In order to use the same time zone on the server and client I would suggest the approach illustrated in the following article.
https://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/editing/utc-time-on-both-server-and-client
It uses the DataSource requestEnd event to remove the applied offset so the same date and time is shown on the client and server.
Regards,
Viktor Tachev
Progress Telerik
By default when a date is returned from the server the browser will apply an offset to it corresponding to the current client-side time zone. In order to use the same time zone on the server and client I would suggest the approach illustrated in the following article.
https://docs.telerik.com/aspnet-mvc/helpers/grid/how-to/editing/utc-time-on-both-server-and-client
It uses the DataSource requestEnd event to remove the applied offset so the same date and time is shown on the client and server.
Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0

Adrian Segovia
Top achievements
Rank 1
answered on 15 Jul 2020, 08:46 PM
Hello, I've use this solution before. However I just started to have problems again.
it looks like this piece is no longer valid: prop.indexOf("/Date(") == 0)
The date does not come with it and it does not apply the offset.
Could you help?
Thanks
Adrian
0