This question is locked. New answers and comments are not allowed.
I have 2 date combos and I want to do some custom filtering
I understand how to use both combos to filter between the selected vaues as per below.
What I want to achieve is making this optional.
I want to allow the user to choose a value from the StartDOB combo and if they do NOT select a value from the EndDOB combo, I want an exact match on the StartDOB - if they DO select an EndDOB, then we do a date range filter like the above.
Is this achievable with custom filtering?
many thanks in advance
I understand how to use both combos to filter between the selected vaues as per below.
.Filterable(filtering => filtering .Filters(filters => filters .Add(o => o.DOB).IsGreaterThanOrEqualTo(DateTime.Parse(ViewData["StartDOB"].ToString())).And().IsLessThanOrEqualTo(DateTime.Parse(ViewData["EndDOB"].ToString())) ))What I want to achieve is making this optional.
I want to allow the user to choose a value from the StartDOB combo and if they do NOT select a value from the EndDOB combo, I want an exact match on the StartDOB - if they DO select an EndDOB, then we do a date range filter like the above.
Is this achievable with custom filtering?
many thanks in advance