destroy

Prepares the DateTimePicker for safe removal from DOM. Detaches all event handlers and removes jQuery.data attributes to avoid memory leaks. Calls destroy method of any child Kendo widgets.

Important: This method does not remove the DateTimePicker element from DOM.

Example

<input id="datetimepicker" />
<script>
$("#datetimepicker").kendoDateTimePicker();

var datetimepicker = $("#datetimepicker").data("kendoDateTimePicker");

// detach events
datetimepicker.destroy();
</script>
In this article
Not finding the help you need?