how do i filter table with date range value?
how do i filter table with date range value?
I am using server side processing. on button click i want to filter my table on the basis of date.
On button click i am grabbing from and two dates from input text boxes. Now i do not know to pass these two values
in oTable.columns(i).search(v).draw();
Is it possible to pass to date in Search() method?
my codes are below
var fromDate;
var fromTo;
$('#orderDate_from').datetimepicker(
{
format: 'DD/MM/YYYY'
}
);
$('#orderDate_from').on('dp.change', function (e) {
fromDate = e.date.format("MM/DD/YYYY");
})
$('#orderDate_to').datetimepicker(
{
format: 'MM/DD/YYYY'
}
);
$('#orderDate_to').on('dp.change', function (e) {
toDate = e.date.format("MM/DD/YYYY");
})
$('.search-date-btn').on('click', function (e) {
var i = $(this).attr('data-column');
var fromDateValue = fromDate;
var toDateValue = toDate;
oTable.columns(i).search(v).draw();
})
Answers
Okay guys what i did is i concatenate two dates as comma separated value and parse and manipulate the data in server side and it did work.
Thank you.