Changing row filter Date format

2 posts, 0 answers
  1. Pier-Gilles
    Pier-Gilles avatar
    2 posts
    Member since:
    Aug 2016

    Posted 08 Nov Link to this post

    Hi,

    I'm trying to change the format  for the filter for a date  (datepicker in the filterRow  from  "MM/d/yyyy"   to "yyyy-MM-dd"

    I attached  a screenshot of the result I'm getting

    The filter format is "MM/d/yyyy"    and my column format is "yyyy-MM-dd" (set by .Format("{0:yyyy-MM-dd}") )

     

    I want the format to be same for both filter  and column data  -  i.e "yyyy-MM-dd"

    Column options:
     
     columns.Bound(c => c.DateInvitation)
                 .Title("Date invitation/rappel")
                 .Format("{0:yyyy-MM-dd}")
                 .Width(150)
                 .Filterable(f => f.Cell(c => c.ShowOperators(false).BindTo(Enumerable.Empty<string>())));
     
    grid options:
     
     .Filterable(ftb => ftb.Mode(GridFilterMode.Row)).Filterable()

  2. Marin
    Admin
    Marin avatar
    1045 posts

    Posted 11 Nov Link to this post

    Hello,

    You can customize the filter input and set preferred date format as shown in this forum post:
    http://www.telerik.com/forums/how-i-can-create-custom-filter-within-a-grid-when-using-mode(gridfiltermode-row)#Vqwbd_y6LUSHCZUsT-hNCw

    Regards,
    Marin
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Telerik UI for ASP.NET Core is out
Back to Top