This is a migrated thread and some comments may be shown as answers.
Configure dateTimePicker(s) in Gantt to 15 min interval
1 Answer 1 View
This is a migrated thread and some comments may be shown as answers.
MiDAS
Top achievements
Rank 1
MiDAS asked on 02 Sep 2019, 03:59 PM

Hi, the default for all built-in dateTimePickers is a 30min interval. Can this be configure to 15min? Also when editing start or end in the gantt column section the dropdown width is restricted by the width of the column. Can this be overridden?

I have attached files to illustrate:

DTP_InColumn.png : The dropdown list needs 15min intervals and list width needs to be wider.

DTP_InNewTask.png: The dropdown list needs 15min intervals.

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 03 Sep 2019, 01:52 PM

Hello,

To change the interval in the Gantt's DateTimePickers, handler the edit event, get a reference to the pickers and set the interval to 15:

edit: function(e) {
  var pickerElement = e.container.find("input[data-role=datetimepicker]");
  
  pickerElement.each(function(index) {
    var dateTimePicker = $(this).data("kendoDateTimePicker");
    dateTimePicker.setOptions({
       interval: 15
    })
  });
},

The following dojo example demonstrates this approach.

With regard to the width of the Picker's dropdown, it depends on the column width, so if you want to increase the dropdown width, make the Start Time and End Time columns wider, e.g.:

{ field: "start", title: "Start Time", format: "{0:MM/dd/yyyy hh:mm}", width: 120, editable: true, sortable: true }

 

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Gantt
Asked by
MiDAS
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or