Datetime filter

Datetime filter

VeltixVeltix Posts: 1Questions: 1Answers: 0

How i can split datatables datetime.
At the moment it only splits date but I need hours:minutes:seconds too..

My code:

$.fn.dataTable.ext.search.push(
function (settings, data, dataIndex) {
var min = $('#min').datetimepicker("getDate");
var max = $('#max').datetimepicker("getDate");
var d = data[4].split("/");
var startDate = new Date(d[1]+ "/" + d[0] +"/" + d[2]);
if (min == null && max == null) { return true; }
if (min == null && startDate <= max) { return true;}
if(max == null && startDate >= min) {return true;}
if (startDate <= max && startDate >= min) { return true; }
return false;
}
);

So it looks like 18/02/2017 - 18:05:45

This discussion has been closed.