highlight low date
highlight low date
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": [2],
"createdCell": function (td, cellData, rowData, row, col) {
if ( cellData > "11/10/2017") {$(td).addClass('highlight')}
}
},
runs
Please help me. Thanks
This question has an accepted answers - jump to answer
Answers
Instead of:
Try:
The parameter for the full row data is
rowData
notdata
. Please seecolumns.createdCell
for details.Kevin
kthorngren, thank you