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

Adding a KendoDatePicker to a Tree Node

1 Answer 127 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 07 Feb 2013, 10:55 PM
I have a Kendo TreeView that I am using Templates to control what controls are added to the child node.
When I Append a node and apply the template I want a KendoDatePicker to be added to the child node, along with several other controls.

I apply the kendoDatePicker and the input changes into the KendoDatePicker.  The problem is that when I select the DatePicker the calendar control flashes visible and then disappears.  It looks like a Kendo Tree node does not support having other Kendo Web Controls as part of a child node template.  The mouse up event seams to conflict with the tree node events and makes the embedded controls not display correctly.  I have tried this with the KendoComboBox and the KendoDatePicker.  They look correct until they are clicked on.  Then they flash display their functionality and it disappears making them not usable as the desired Kendo Control.

Does the Kendo Tree Node Template support having other Kendo controls in them?

Thanks,
Justin 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Feb 2013, 02:19 PM
Hello Justin,

The TreeView does not support nested widgets and this behavior is expected. The treeview handles the selection after the datepicker so the calendar will be immediately closed. For this scenario, it is possible to avoid this behavior by stopping the event e.g.

$(function () {
    $("#treeview").on("click", ".k-datepicker", function (e) {
        e.stopPropagation();
    });
});
Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Justin
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or