I have a grid containing a few date columns. An example of the json for a data column is as follows:
{
title: "My Date Field",
field: "myDate",
type: "date",
format: "{0:MM/dd/yyyy hh:mm tt}",
filterable: { ui: "datetimepicker", format: "MM/dd/yyyy hh:mm" }
}
The column displays in the proper date format (MM/dd/yyyy hh:mm tt) and the filter uses the proper datetimepicker control, which also shows the selected date/time in the proper format (MM/dd/yyyy hh:mm). The problem is that the filter value in the parameterMap object for the date column is always in this format:
"Tue Jan 12 2016 00:00:00 GMT-0700 (Mountain Standard Time)"
I realize that I could override the parameterMap function in the grid and write code to look up the column type and, if it is a date, convert the filter value to the format that I want, but before I do that I would like to know if there is a way to simply control the default format that the parameterMap uses for the filter value when the filter value comes from a datetimepicker control. Any info you can provide would be appreciated.