日期时间选取器 $( "#grid" )中的列.kendoGrid



我在剑道网格中有这个列

{    field: "Fecha",
      title: "Fecha Aviso",
      width: 100,
      attributes: { style: "text-align:center;" },
      template: "#= Fecha != null ? kendo.toString(Fecha, 'd/MM/yyyy') : '' #"
}

这是模型字段

    fields: {
    Fecha:  { type: "date", format: "{0:dd/MM/yyyy}" }, 
...

现在batchEdit只显示datePicker。我如何输入dateTimePicker?

这是一个dojo显示它为您工作:批量编辑中的自定义日期时间选择器

我所做的就是为列Date 定义editor
editor: function (container, options) {
    var input = $("<input/>");
    input.attr("name", options.field);
    input.appendTo(container);
    input.kendoDateTimePicker({});
}

所做的就是覆盖默认的编辑器模板,并为您应用日期时间选择器控件。

我使用这个Grid API: Column Editor作为参考来生成这个简单的演示。

如果你需要进一步的信息,让我知道,我会添加到答案,如果我可以。

最新更新