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

3 posts, 0 answers
  1. Michael
    Michael avatar
    2 posts
    Member since:
    Aug 2013

    Posted 18 May 2015 Link to this post


    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?


     Michael Mc Cudden

  2. Daniel
    Daniel avatar
    2231 posts

    Posted 20 May 2015 Link to this post

    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.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Michael
    Michael avatar
    2 posts
    Member since:
    Aug 2013

    Posted 21 May 2015 Link to this post

    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.


Back to Top