Null dates in 1.10
Null dates in 1.10
Prior to 1.10, i handled Null dates by using fnRender
"mRender": function (data, type, row) {
if (moment(data.trim()).isValid()){
var DateToCheck = moment(data.trim()).format('DD/MM/YY');
return(DateToCheck);
}
else
{
return '';
}
},"searchable": false, "class": "center", "targets": [ 3,4,5,6]
fnrender isn't in 1.10 and using render doesn't work either. Is there something i've missed?
Lynd
This question has an accepted answers - jump to answer
Answers
columns.render
http://datatables.net/reference/option/columns.render
Thanks tangerine
Can you show us a test case with the problem please? If the value really is null, then
columns.defaultContent
is probably the best way of handling it, unless you need for formatting function, in which case it will be best in yourcolumns.render
function.Allan
I managed to fix this in the end and the issue was with my php class and how i'd used the strtotime fuction. using render works perfectly now
thank you