I\'m using datatables and using bootstrap-daterangepicker to select a range for which data will be shown in Datatables.
It is working fine.
The problem is when I
For the google searchers
Very hardly I managed to destroy the Datatable
, Empty it's all previous data before loading new data and re-initializing Datatable by doing like this,
if ($.fn.DataTable.isDataTable("#myTbl")) {
("#myTbl").DataTable().destroy();
}
$('#myTbl tbody > tr').remove();
...
// Load table with new data and re-initialize Datatable