This is a migrated thread and some comments may be shown as answers.

DateTimePicker not invoked second time

1 Answer 164 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
prasanna
Top achievements
Rank 1
prasanna asked on 10 Jan 2013, 11:22 AM
Team,

I have a html grid which has input value that consists of datetimepicker.

I have grid with 3 rows ans when I tried to tag kendo datepicker to the column, it is visible only for the first row.

Am I missing some thing..

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 10 Jan 2013, 08:40 PM
Hello Prasanna,

In order to display Kendo UI DateTimePicker for each of the rows in the Grid you can use editor for the column. For example:

$("#grid").kendoGrid({
  //....
  columns: [{
     //....
     { field: "OrderDate",
      format: "{0:dd MMMM yyyy HH:mm}",
      editor: dateTimeEditor
     }
});
                     
function dateTimeEditor(container, options) {
  $('<input data-bind="value:' + options.field + '"/>')
    .appendTo(container)
    .kendoDateTimePicker({
      format: "{0:dd MMMM yyyy HH:mm}",
      interval: 15,
      timeFormat: "HH:mm"
    });
}

A working example which demonstrates how to create a custom edotor is available here.

Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Date/Time Pickers
Asked by
prasanna
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or