Renderer not passing through the if condition for a date filed
Renderer not passing through the if condition for a date filed
Innocentm
Posts: 11Questions: 3Answers: 0
Am trying to display blank for null or '1971-01-01' fields in my DB but the if block does not get executed
{ data: "eta",
render: function ( data, type, row ) {
if (data =='1971-01-01') {
return '';
}
else {
return data;
}
}
},
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hard to say wihtout seeing your data. Maybe you can add a
console.log
command to see whatdata
actually is:Kevin
Below is my data
I don't see
1971-01-01
in the data you posted above. Maybe you want1970-01-01
instead?Kevin
Thanks Kevin, I have also just spotted that now. It's working!!