About defaultContent and render options
About defaultContent and render options
yu yen kan
Posts: 65Questions: 31Answers: 0
I have a field using default content and render in the sametime
column: [{
data: date_at',
title: "Date",
defaultContent: "No generated",
render : function ( data, type, full, meta ) {
return new Date(data);
}
}]
the problem is empty string is still go to render function and cause min date value.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
columns.defaultContent
is only used if the data for the column isnull
. Your rendering function is basically always going to override it, so you'd need to add anif
condition into your rendering function.Allan