datetimePicker Column in $(“#grid”).kendoGrid

主宰稳场 提交于 2019-12-24 10:42:36

问题


I have this column in kendo grid

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

And this is the model field

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

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


回答1:


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

all I have done is define the editor for the column called Date

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.

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.



来源:https://stackoverflow.com/questions/32272746/datetimepicker-column-in-grid-kendogrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!