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

Auto open KendoDatePicker in editable KendoGrid control

1 Answer 75 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 25 Feb 2016, 08:33 PM

Hi,

I'm having some trouble getting the KendoDatePicker control to automatically open when its cell is selected in my editable Kendo Grid control while using AngularJs.

My editable column is defined as so:

gridColumns.push({
    field: currentField.FieldName.replace(/ /g, "_"),
    title: currentField.FieldName,
    format:"{0:yyyy-MM-dd}",
    editor: $scope.dateTimeCmtEditor,
    template: "#= (" + currentField.FieldName.replace(/ /g, "_") + " == null || (typeof " + currentField.FieldName.replace(/ /g, "_") + " == 'undefined')) ? ' ' : kendo.toString(kendo.parseDate(" + currentField.FieldName.replace(/ /g, "_") + ", 'yyyy-MM-dd'), 'yyyy-MM-dd') #",
    width: 150
});

 

And my editor is defined like so:

$scope.dateTimeCmtEditor = function (container, options) {
    $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
            .appendTo(container)
                .kendoDatePicker({});
};

 

I would like the date picker to open automatically when the user either clicks in the cell or navigates to the cell using the keyboard and hits Enter.

Thanks,

Ian

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 01 Mar 2016, 07:38 AM
Hi Ian, 

This behavior is not supported out of the box. You could however, try utilizing the Grid's navigate event and the editCell method

Regards,
Alexander Popov
Telerik
 
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
Ian
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or