关于telerik:Kendo UI网格MVC-批量内联编辑-DateTime字段未显示Datepicker

Kendo UI Grid MVC - Batch inline editing - Datepicker not displayed for DateTime field

我正在使用具有4列的MVC Kendo网格,其中之一是DateTime字段。
网格允许内联和批处理编辑。 当我单击布尔值字段时,它显示一个复选框。 如果我单击一个文本字段,它将显示一个TextField。 我猜想对于日期字段,它应该显示一个DatePicker。
而是显示一个TextField。

这是网格上的列声明:

1
2
3
4
5
6
7
8
@(Html.Kendo().Grid<MyModel>()
            .Name("Grid")
            .Columns(columns =>
            {
columns.Bound(e => e.MyDate).Format("{0:dd.MM.yyyy}").Title("Date");
})
.Editable(x => x.Mode(GridEditMode.InCell))
.Batch(true)

这是我的模型属性:

1
2
[DataType(DataType.DateTime)] // making data type as date    
public DateTime? MyDate{ get; set; }

我想念什么? 我目前唯一的猜测是缺少.js文件或其他内容? 请告诉我。
谢谢!


您必须添加相同的编辑器模板。 您可以从Kendo站点或演示中获得所有编辑器模板的下方。

enter image description here

Date.cshtml

1
2
3
@model DateTime?

@(Html.Kendo().DatePickerFor(m => m))

让我知道是否有任何问题。