I am using the following in a HTML form, where Model.SecheduledActions is a List<ScheduledAction> that contains a member that is a DateTime.
01.
@(Html.Kendo().Grid(Model.ScheduledActions)
02.
.Name("ScheduledItems")
03.
.Columns(c =>
04.
{
05.
c.Bound(p => p.Id).Hidden().ClientTemplate("#= Id #" +
06.
"<
input
type
=
'hidden'
name
=
'ScheduledActions[#= index(data)#].Id'
value
=
'#= Id #'
/>"
07.
);;
08.
c.Bound(p => p.Cylinders).ClientTemplate("#= Cylinders #" +
09.
"<
input
type
=
'hidden'
name
=
'ScheduledActions[#= index(data)#].Cylinders'
value
=
'#= Cylinders #'
/>"
10.
);
11.
c.Bound(p => p.ScheduledDate).ClientTemplate("#= ScheduledDate #" +
12.
"<
input
type
=
'hidden'
name
=
'ScheduledActions[#= index(data)#].ScheduledDate'
value
=
'#= ScheduledDate #'
/>"
13.
);
14.
})
15.
16.
.DataSource(dataSource => dataSource.Ajax()
17.
.Model(model =>
18.
{
19.
model.Id(p => p.Id);
20.
model.Field(p => p.Id).Editable(false);
21.
})
22.
.ServerOperation(false)
23.
))
However when this data is submitted, the datetime is DateTime.Min, and I have no way of editing the datetime in the grid to begin with.
How might I go about 1) being able to select a date for the ScheduledDate member, and 2) Specify the type of editor for that column?