Hi Héctor,
Thanks for contacting Syncfusion support.
We suspect that you are facing server and client time zone difference issue. DataTime will be parsed in the client-end after retrieved from the server-end. While parsing the DateTime, the conversion will be based on the client time zone. To overcome this problem, you can set the timezone offset from UTC in hours using the ej.serverTimezoneOffset which has been explained in the following Help Document.
The date-time request on the controller is depend on the server time zone.
Suppose, application has been hosted in EST time zone and client may be in IST, GMT etc. in that case, date will differ from database. If the client and server has different timezone, storing date-time on server using server timezone which is cause of the issue.
Refer the below code example to resolve the issue.
<script type="text/javascript">
var serverTimeZoneDiff = -5.0 // if your server is in EST time zone (UTC -5.0) (in hours)
var clientSideTimeZoneDiff = new Date().getTimezoneOffset() / 60; // get client time zone difference and convert it to hours;
ej.serverTimezoneOffset = serverTimeZoneDiff + clientSideTimeZoneDiff;
</script>
|
If you are still facing any problem, please share the following information to analyze the problem at our end.
- Code example of the Grid
- Confirm the version of Essential Studio (14.4.0.15)
- If possible, share the hosted sample link.
Regards,
Thavasianand S.