I would like to format row in my table according to their dates. I would like date in a certain range (x to u) to have a certain format, range (x to o) another format and all date before x another one like ( x and all before that)
rowCallback: function (row, data, index) {
if (data[4] == [moment("MM-DD-YYYY").subtract(1, 'days'), moment("MM-DD-YYYY").subtract(4, 'month').startOf('month')]) {
$(row).find('td:eq(4)').addClass('expired')
} else if (data[4] == [moment("MM-DD-YYYY"), moment("MM-DD-YYYY").add(7, 'days')]) {
$(row).find('td:eq(4)').addClass('oneweek')
} else if (data[4] == [moment("MM-DD-YYYY"), moment("MM-DD-YYYY").add(4, 'weeks')]) {
$(row).find('td:eq(4)').addClass('fourweek')
}
}