Kendo ui 剑道UI绑定日期选择器到列
所以,我有剑道网格,在其中我希望日期列是可编辑的。看起来是这样的:Kendo ui 剑道UI绑定日期选择器到列,kendo-ui,Kendo Ui,所以,我有剑道网格,在其中我希望日期列是可编辑的。看起来是这样的: ... //and date field in options looks like this: { field: "BirthDate", title: "Birth Date", format: "{0:dd-MMM-yyyy hh:mm:ss tt}", editor:
...
//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({});
}
函数日期编辑器(容器、选项){
变量输入=$('');
input.appendTo(容器)
input.kendoDateTimePicker({});
}
问题已结束,编辑器通过数据源架构(kendo autobinds datepicker)添加到“日期”类型的字段中。是的,看起来您的方向正确。