2015-08-28 73 views
0

我在劍道電網dateTimePicker的列( 「#電網」)。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只顯示日期選擇器。我怎樣才能輸入dateTimePicker?

回答

0

這裏是一個道場,顯示它爲你工作:custom datetime picker in batch editing

所有我做的是定義editor名爲日期列

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

    input.appendTo(container); 

    input.kendoDateTimePicker({}); 
} 

這一切確實是覆蓋默認編輯器模板併爲您應用日期時間選取器控件。

我用這個Grid API: Column Editor作爲參考點來產生這個簡單的演示。

如果您需要更多信息,請告訴我,如果可以的話,我會加上答案。

+0

工作正常!謝謝! – user3364180