fixed store order filder by date
This commit is contained in:
@@ -640,10 +640,10 @@
|
||||
$( document ).ready(function() {
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function (settings, data, dataIndex) {
|
||||
|
||||
|
||||
var min = $('#min').datepicker("getDate");
|
||||
var max = $('#max').datepicker("getDate");
|
||||
var startDate = new Date(data[4]);
|
||||
var startDate = new Date(data[9]);
|
||||
if (min == null && max == null) { return true; }
|
||||
if (min == null && startDate <= max) { return true;}
|
||||
if(max == null && startDate >= min) {return true;}
|
||||
@@ -654,6 +654,7 @@
|
||||
|
||||
$("#min").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
||||
$("#max").datepicker({ onSelect: function () { table.draw(); }, changeMonth: true, changeYear: true });
|
||||
|
||||
var table = $('#tbl_store_orders').DataTable({
|
||||
scrollX: true,
|
||||
dom: 'Bfrtip',
|
||||
@@ -679,7 +680,8 @@
|
||||
title : function() {
|
||||
return "ORDER REPORTS";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//,
|
||||
// {
|
||||
// extend: 'pdf',
|
||||
@@ -711,7 +713,7 @@
|
||||
],
|
||||
columnDefs: [
|
||||
{ targets: 9, type: 'date', visible: false },
|
||||
{ targets: 19, type: 'date' }
|
||||
{ targets: 9, type: 'date' }
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user