I'm using Kendo with ASP.NET MVC. I have a Kendo Grid with several different columns. A few of these columns contain dates. All of these columns can be filtered on several different criteria (is equal to, is not equal to, is before, etc.). When the user chooses to filter any of these columns, in the filter criteria window, they should be able to use a Kendo DatePicker widget.
Here's the catch. All our Dates are represented as strings, not DateTimes. The reason for this is simple: when displaying DateTime objects, .NET and/or Kendo convert the DateTimes to the local time of the browser displaying them. We cannot allow this. We need the dates to be rendered precisely as we give them.
When a column represents a DateTime, the DatePicker is available by default. So the question is, how can I have the filter window display a DatePicker when the column displays strings?
I assume something special will have to be done in the razor. The razor fields are bound to properties in the model. The pertinent razor looks something like this:
@(Html.Kendo().Grid<JobsAcrossWorld>()
.Name("JobsAcrossWorld")
.Columns(c =>
{
c.Bound(m => m.ScheduleDate); // this is a DateTime as a string
c.Bound(m => m.GeoArea);
c.Bound(m => m.Begin); // this is a DateTime as a string
c.Bound(m => m.End); // this is a DateTime as a string
c.Bound(m => m.Effort);
})
.Pageable(p => p.
Enabled(true)
...many more options...
Sorry if this is a Kendo newbie question; I'm fairly new at the Kendo stuff.