This is a migrated thread and some comments may be shown as answers.

en-CA cultures was wrong at grid

3 Answers 19 Views
Globalization
This is a migrated thread and some comments may be shown as answers.
Khanh
Top achievements
Rank 1
Khanh asked on 15 Aug 2018, 02:37 AM

Hi all, Please help me to fix issue. Data display in grid is not correctly. Time always is AM not PM

(Ex: 2018-08-14 1:00:00 PM
instead 2018-08-14 1:00:00 AM )

3 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 16 Aug 2018, 03:20 PM
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
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
Boyan Dimitrov
Telerik team
answered on 22 Aug 2018, 10:10 AM
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
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.
Tags
Globalization
Asked by
Khanh
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Khanh
Top achievements
Rank 1
Share this question
or