I am working with a datetime column in my Kendo Grid that displays values like this: 2014-04-11 12:43:41.720
To simplify the display, I have changed the template to show only short dates: 04/11/2014
The reason for not sending preformatted data to the columns is so that the time is considered when sorting. However, I face an issue when filtering using an "equal to" filter. If I select 4/11/2014
from the datepicker, no results are shown because the default time is 12:00:00.00
.
Is there a way to filter based on the text rather than the value? Alternatively, can I send preformatted dates to the grid and use a different field for sorting?
This is a snippet of the JavaScript code for my column:
columns: [
{
field: "CREATEDATE",
title: "Created",
width: 78,
template: '#= kendo.toString(kendo.parseDate(CREATEDATE, "yyyy-MM-dd"), "MM/dd/yyyy") #',
filterable: true,
attributes: { style: "text-align:center;" }
}
]