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

Kendo UI PHP Grid Filter Row Date Picker in Spanish date format

2 Answers 219 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 18 May 2015, 03:36 PM

Hi.

We have a Kendo Grid with the Filter Row activated (using Kendo UI PHP), the web page has the Spanish culture loaded so date formats are shown in Spanish.

One of the Grid columns is a date created with ->format('{0:dd/MM/yyyy}', this shows all dates in Spanish format on the Grid and New/Update forms as expected.

The Grid Filter Row command ->mode("row"); on the other hand creates a date picker with the default date format MM/dd/yyyy thus using a different format to filter the column.

If the users picks a date from the mini calendar, the filter works as expected (although it shows the date in a different format than the Grid). On the other hand if they type it in manually using the format shown in the Grid the filter does not work as they have used the wrong format for the field.

 Any ideas on how to get a Filter Row date picker created in PHP to accept the culture loaded in the page?

 Regards

 Michael Mc Cudden

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 May 2015, 01:12 PM
Hello Michael,

I replied to the support ticket with the same question that you have opened. For reference, I am pasting my reply below:

Could you provide the code that you are using for the page? The datepicker should use the current culture short date format as long as the culture is set before the datepicker is initialized. The datepickers in the filter row will be initialized when the grid is being initialized. If the culture is set later then you could either use the approach demonstrated in the globalization demo to change the format or use a template and initialize a datepicker with the needed format.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Michael
Top achievements
Rank 1
answered on 21 May 2015, 07:57 AM

Thanks for the input Daniel.

I was loading the Spanish Culture JS before the Grid render function but setting the kendo.culture("es-ES"); variable after rendering the Grid.

It now works as expected.

 Thanks.

Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Michael
Top achievements
Rank 1
Share this question
or