$(&“#grid&").kendoGrid中的datetimePicker列 [英] datetimePicker Column in $("#grid").kendoGrid

查看:90
本文介绍了$(&“#grid&").kendoGrid中的datetimePicker列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在剑道网格中有此列

{    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?

Now the batchEdit shows only the datePicker. How can I input dateTimePicker?

推荐答案

下面是显示它对您有效的dojo:批量编辑中的自定义日期时间选择器

Here is a dojo that shows it working for you: custom datetime picker in batch editing

我要做的就是为日期

editor: function (container, options) {
    var input = $("<input/>");
    input.attr("name", options.field);

    input.appendTo(container);

    input.kendoDateTimePicker({});
}

所有这些操作将覆盖默认的编辑器模板,并为您应用日期时间选择器控件.

All this does is override the default editor template and applies the datetime picker control for you.

我使用了网格API:列编辑器作为制作此简单演示的参考.

I used this Grid API: Column Editor as a point of reference to produce this simple demo.

如果您需要更多信息,请告诉我,如果可以的话,我会在答案中添加内容.

If you need further info let me know and I will add to the answer if I can.

这篇关于$(&amp;“#grid&amp;").kendoGrid中的datetimePicker列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆