highlight low date

highlight low date

infotbainfotba Posts: 17Questions: 3Answers: 0

external json file is like..

{
"data": [
{
"planned_date":"11/10/2017",
"actual_date":"07/03/2018"
},
....
]
}
.....

code is :
{
"targets": [2],
"createdCell": function (td, cellData, rowData, row, col) {
if ( cellData > data.planned_date ) {$(td).addClass('highlight')}
}
},

does not run. But
...
{
"targets": [12],
"createdCell": function (td, cellData, rowData, row, col) {
if ( cellData > "11/10/2017") {$(td).addClass('highlight')}
}
},
runs

Please help me. Thanks

Answers

This discussion has been closed.