diff --git a/ej2-asp-core-mvc/code-snippet/grid/filtering/filter-menu-format/razor b/ej2-asp-core-mvc/code-snippet/grid/filtering/filter-menu-format/razor index 0de47bbaf5..a9b36aa365 100644 --- a/ej2-asp-core-mvc/code-snippet/grid/filtering/filter-menu-format/razor +++ b/ej2-asp-core-mvc/code-snippet/grid/filtering/filter-menu-format/razor @@ -1,8 +1,14 @@ +@{ + var FilterParams = new { @params = new Syncfusion.EJ2.Calendars.DateTimePicker + { + Format = "M/d/y HH:mm", + } }; +} @Html.EJS().Grid("grid").DataSource((IEnumerable)ViewBag.dataSource).AllowFiltering().Height("300px").Columns(col => { col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); - col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Type("datetime").Format("M/d/y HH:mm").Add(); - col.Field("ShippedDate").HeaderText("Shipped Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Type("datetime").Format("M/d/y HH:mm").Add(); + col.Field("OrderDate").HeaderText("Order Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Type("datetime").Format("M/d/y HH:mm").Filter(FilterParams).Add(); + col.Field("ShippedDate").HeaderText("Shipped Date").Width("130").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Type("datetime").Format("M/d/y HH:mm").Filter(FilterParams).Add(); col.Field("ShipCountry").HeaderText("Ship Country").Width("120").Add(); }).FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Menu); }).ActionComplete("actionComplete").Render()