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

Changing row filter Date format

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pier-Gilles
Top achievements
Rank 1
Pier-Gilles asked on 08 Nov 2016, 03:44 PM

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()

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 11 Nov 2016, 01:07 PM
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
Tags
Grid
Asked by
Pier-Gilles
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or