3 Answers, 1 is accepted
0
Hello,
Could you please check what data is coming from the server and loaded in the grid? Is it possible that for some reason the dates returned from the server are only AM dates? I would suggest to prepare a simple http://dojo.telerik.com/ example where the issue can be replicated so we can investigate it.
Regards,
Boyan Dimitrov
Progress Telerik
Could you please check what data is coming from the server and loaded in the grid? Is it possible that for some reason the dates returned from the server are only AM dates? I would suggest to prepare a simple http://dojo.telerik.com/ example where the issue can be replicated so we can investigate it.
Regards,
Boyan Dimitrov
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
Khanh
Top achievements
Rank 1
answered on 20 Aug 2018, 11:20 AM
Hi, I'm using Kendo UI ver 2017.2.621.
Culture: En-CA
Data: 2018-08-14 5:00:00PM
Value display : 2018-08-14 5:00:00AM
0
Hello,
The reason for this behavior could be caused due to the fact that the data source receives string values and is instructed to convert them to dates (the `type` property of the field is set to `date`). The result is that the datasource parses the string values based on the culture and its date parsing formats which usually are more than one. So I guess it just picks a format that doesn't include time designator and since the time value is bellow 12, it converts it to AM.
The easiest fix to this behavior is to instruct the data source to use a date parsing format that fits your data as described here.
And this is a modified version of the dojo example that utilizes this approach:
http://dojo.telerik.com/iHEXeBOH/8
Regards,
Boyan Dimitrov
Progress Telerik
The reason for this behavior could be caused due to the fact that the data source receives string values and is instructed to convert them to dates (the `type` property of the field is set to `date`). The result is that the datasource parses the string values based on the culture and its date parsing formats which usually are more than one. So I guess it just picks a format that doesn't include time designator and since the time value is bellow 12, it converts it to AM.
The easiest fix to this behavior is to instruct the data source to use a date parsing format that fits your data as described here.
And this is a modified version of the dojo example that utilizes this approach:
http://dojo.telerik.com/iHEXeBOH/8
Regards,
Boyan Dimitrov
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.