I am having an issue with DataTable DateTime function maybe its a bug.
callsminDate = new DateTime($('#callsmin'), {
format: 'll',
buttons: {
clear: true
}
});
This is my initialization of DateTime on my input #callsmin
Then on change, I filter the table which is working well, just on the first selection it gives me the wrong value;
// Refilter the table
$('#callsmin, #callsmax').on('change', function () {
callstable.draw();
mincallsts = moment(callsminDate.val(), "M/D/YYYY").unix();
maxcallsts = moment(callsmaxDate.val(), "M/D/YYYY").unix();
console.log(mincallsts);
});
When I first select a Date it gives me hours and seconds too in my timestring, which is 1655493811
Then I choose another Date and back to this date, and it gives me the correct value which is 1655424000 (notice there is no hours and minutes)
It seems as though DateTime is initializing with the hours and minutes initially, then changes to not include the hours and minutes which is what i want.