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

Team Efficiency example StatsFrom/StatsTo

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Graham
Top achievements
Rank 1
Graham asked on 16 Mar 2017, 09:29 AM

Hi, the date filtering does not appear to be working.  I am in the UK and i have formatted the datepicker to be dd/MM/yyyy but when the data is being filtered it is not working correctly.  Is there a quick fix for this.  Also if you type into the datepicker and press enter should the grid data update?  

 

Thanks Graham

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 20 Mar 2017, 08:26 AM
Hello Graham,

To ensure correct interaction between the client and server when using a culture different than the default in the app (en-US), make sure that you apply the needed globalization settings. More specifically:

1) Set the CurrentUICulture in web.config:
<system.web>
    <globalization culture="en-GB" uiCulture="en-GB" />
</system.web>

2) Load the culture scripts in Layout.cshtml:
.......
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
    @Html.Kendo().Culture("en-GB")
</head>

3) Apply the current culture on the client:
<body>
    <script>kendo.culture("en-GB")</script>

Now, you can set your column format string to short date pattern directly, as it is dd/MM/yyyy by default for en-GB culture:
columns.Bound(f => f.OrderDate)
   .Title("ORDER DATE")
   .Format("{0:d}")
   .Width(150);


Regards,
Tsvetina
Telerik by Progress
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.
Tags
General Discussions
Asked by
Graham
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or