My Grid Column Filter for a Time value is not working by this definition:
Model
public partial class Session : PropertyBase
{
[Display(Name = "Id")]
public int Id { get; set; }
[Display(Name = "Device Id")]
public System.Int32? DeviceId { get; set; }
[Display(Name = "Group Id")]
public System.Int32? GroupId { get; set; }
[MaxLength(50)]
public System.String UniqueId { get; set; } = $"{Guid.NewGuid()}";
/// <
summary
>
/// Track when the session took place
/// </
summary
>
public System.DateTime? Timestamp { get; set; }
[NotMapped]
[DataType(DataType.Date)]
public System.DateTime? Date => Timestamp;
[NotMapped]
[DataType(DataType.Time)]
public System.DateTime? Time => Timestamp;
Grid
@(Html.Kendo().Grid<
Session
>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => command
.Custom("Detail")
.Click("goDetail"))
.Width(Glossary.Portal.ButtonWidth);
columns.Bound(p => p.Date).Title("Date").Format("{0:MM/dd/yyyy}")
.Filterable(ftb => ftb.Cell(cell => cell.Operator("gte")
.ShowOperators(false)));
columns.Bound(p => p.Time).Title("Time")
.Format("{0:hh:dd:mm tt}")
.Filterable(x => x.UI(GridFilterUIRole.TimePicker));
})
.Pageable()
.Sortable()
.Scrollable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.HtmlAttributes(new { style = "height:550px;" })
.Selectable()
.Navigatable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("IndexJson", "Sessions")
.Data("gridGetData"))))