I am using datatable framework an I want to highlight date which has been passed away
for example now it is 12:00 AM if there is any row how have date and time before 12:00 AM today it should be red
This is the code that I am trying to edit
"createdRow": function ( row, data, index ) {
if ( data[10].replace(/[\$,]/g, '') * 1 < 150000 ) {
$('td', row).eq(10).addClass('highlight');
}
} ,
basically my idea is to make this code look like this
if ( data[10].replace(/[\$,]/g, '') < now) {
my time format is like this
2016-09-01 05:09:07
any ideas ?