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

UK date Formatting Issue

2 Answers 319 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AP
Top achievements
Rank 1
Iron
Iron
Veteran
AP asked on 10 Jan 2013, 12:13 PM
I have a web application, built using MVC 3 and Kendo extensions for MVC version 2012.3.1210.

I'm using the format function to format dates shown in Grids, however they are displaying in the US format (i.e. month first, then day), instead of the UK format, even though I'm setting the kendo culture to en-GB.
e.g.:- The field definition
columns.Bound(p => p.attdate).Title("Att Date").Format("{0:d}");

and the culture reference in _Layout.cshtml :-
<script type="text/javascript">
        //set current to the "en-GB" culture script
        kendo.culture("en-GB");
</script>

The dates shown in date picker controls are fine, - just when displayed in grids.  How can I get UK dates to display?

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 10 Jan 2013, 12:39 PM
Hi Andrew,

 You can refer to the troubleshooting help topic. Also the sample ASP.NET MVC application contains a demo showing how to use different .NET cultures. Look for the "globalization" demo of the grid.

Kind regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
1
AP
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 10 Jan 2013, 12:45 PM
Thanks,
including the script fixed things.
    <script src="@Url.Content("~/Scripts/kendo/2012.3.1210/cultures/kendo.culture.en-GB.min.js")"></script>
 
    <script type="text/javascript">
        //set current to the "en-GB" culture script
        kendo.culture("en-GB");
</script>


Tags
Grid
Asked by
AP
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Atanas Korchev
Telerik team
AP
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or