I have a model DateTime property called CreatedDate and If I try to filter by date using the filter 'Is equal to' for a single date, it will not filter the records for the given date due its time part in it filter checking. So How can I make it filter truncating the time part from the filter ?
Pol
public class EmployeeViewModel { public string Name{get; set;} public DateTime CreatedDate{get; set;} } In Kendo Grid column.Bound(c=>c.CreatedDate).Title("Created Date")
Hi Pol,
Thank you for the details provided.
Yes, you are totally correct - the "Is Equal To" filter for the DateTime is taking the time part as well.
In order to achieve the needed filtering behavior, I would recommend adding a helper field in your Model which will use only the Date part of your original field. Show the original column value in your ClientTemplate for the column, but bind the column to the new one.
I hope this information helps.
Kind Regards,
Anton Mironov
Hi Pol,
I am glad to hear that the recommended approach is working as expected.
If further assistance or information is needed, do not hesitate to contact the community.
Best Regards,
Anton Mironov