We are trying to provide a Kendo Datepicker inside Grid expand Client Detail Template using Kendo template, below is the snipping we are trying:
<script id="templateUserDefinedFieldsHealthPlan" type="text/x-kendo-template">
<div id="indider"> </div>
<input id="datePicker1" />
</script>
and the jquery script tp provide datepicker is mentioned below :
<script>
$(() => {
var template = kendo.template($("#templateUserDefinedFieldsHealthPlan").html());
var result = template({});
//alert(result);
$('#indider').html(result);
$('#datePicker1').kendoDatePicker();
});
</script>
but in spite of Kendo DatePicker, only blank textbox is rendering. Please suggest
The problem is that you placed the
<div id="indider"> </div>element inside the template too. You need to place it outside the template to replace it with the template's content.See the snippet.