I have a bit of a problem . I can succesfully sort my date range now but the problem is that it doesn't display on my datatable it's always has this process popup box
But i have the data as you can see here on the image below
I am using CodeIgniter 3.x
by the way.
Here's my code
$('.input-daterange').datepicker({
todayBtn: 'linked',
format: "yyyy-mm-dd",
autoclose: true
});
function fetch_data(start_date='', end_date=''){
var dataTable = $('#table-sales').DataTable({
"processing": true,
"serverSide": true,
"order":[],
"ajax":{
url: "sales/rangeDates",
type: "POST",
data:{
'start_date':start_date, 'end_date':end_date
},
success:function(data){
$('#table-sales').html(data);
}
}
});
}
$('#search').click(function(){
var inv_type = $('#invType').val();
var start_date = $('#start_date').val();
var end_date = $('#end_date').val();
if(start_date != '' && end_date != '' && inv_type != 0){
$('#table-sales').DataTable().destroy();
fetch_data(start_date,end_date);
}else{
alert('Both Date is Required and Choose what to show!');
}
});
Please let me know if there's a missing information I need to show you guys. Thank you.