Kendo UI 将日期选择器绑定到列
Kendo UI bind datePicker to column
所以,我有 kendo 网格,我希望其中的日期列是可编辑的。它看起来像这样:
...
//and date field in options looks like this:
{
field: "BirthDate",
title: "Birth Date",
format: "{0:dd-MMM-yyyy hh:mm:ss tt}",
editor: dateEditor,
editable: true,
width: "120 px"
}
如何通过js函数绑定datePicker?
是不是有点像
function dateEditor(container, options) {
var input = $('<input name="' + options.field + '" required="required" />');
input.appendTo(container)
input.kendoDateTimePicker({});
}
问题已关闭,编辑器通过数据源架构添加(kendo 自动将日期选择器绑定到“日期”类型的字段)。
所以,我有 kendo 网格,我希望其中的日期列是可编辑的。它看起来像这样:
...
//and date field in options looks like this:
{
field: "BirthDate",
title: "Birth Date",
format: "{0:dd-MMM-yyyy hh:mm:ss tt}",
editor: dateEditor,
editable: true,
width: "120 px"
}
如何通过js函数绑定datePicker? 是不是有点像
function dateEditor(container, options) {
var input = $('<input name="' + options.field + '" required="required" />');
input.appendTo(container)
input.kendoDateTimePicker({});
}
问题已关闭,编辑器通过数据源架构添加(kendo 自动将日期选择器绑定到“日期”类型的字段)。