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

Date format does not show AM/PM

2 Answers 2686 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 17 Aug 2017, 01:02 AM

Hey guys,

my grid doesn't work well with formatting date times. Our customers do have the option to choose between 12 and 24 hour format. But in my grid, the AM/PM isn't shown. 

$column = new \Kendo\UI\GridColumn();
$column->format('dd.MM.yyyy hh:mm:ss tt');

 

Date and time are completely correct, but I am missing the 'tt' at the end. What am I doing wrong?

Thanks and regards,

Chris

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 18 Aug 2017, 10:38 AM
Hello Christopher,

Some cultures are without short time pattern, so could you please elaborate what culture you are setting in your application? Meanwhile you could also test to set a specific culture that has short time pattern:

Best Regards,
Konstantin Dikov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Christopher
Top achievements
Rank 1
answered on 18 Aug 2017, 10:55 AM

Hello Konstantin,

didn't know that some cultures doesn't support short time pattern. My setting was 'de-DE', with 'en-US' it works fine. Thank you! :) 

Chris

Tags
Grid
Asked by
Christopher
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Christopher
Top achievements
Rank 1
Share this question
or