hide()
Hides the DateTime instance.
Please note - this property requires the DateTime extension for DataTables.
Description
This method detaches the DateTime picker element from the DOM, effectively leaving just the original input
element in the document.
This can be useful in cases where a container that holds the input
for the DateTime is removed from the display (e.g. a modal form). Calling this method will ensure that the date / time picker is hidden, regardless of its focus state.
Type
hide()
Examples
Hide an instance of DateTime:
var dt = new DateTime(document.getElementById('#dtInput'));
dt.hide();
Ensure the date picker is hidden when closing a Bootstrap 4 modal:
var dt = new DateTime($('#dtInput'));
$('#myModal').on('hide.bs.modal', function (event) {
dt.hide();
});