Having a N/A as default value in Date column sorting not working properly
Having a N/A as default value in Date column sorting not working properly
gsolai007
Posts: 3Questions: 2Answers: 0
{ data : "Effective_Date_ACE__c", defaultContent: "N/A", render: function (data) {
if(data != null ) {
var formatdate = moment(data).add(1, 'days').format('MM/DD/YYYY');
return formatdate;
}
}, className: "CustomDataFont" },
This discussion has been closed.
Answers
The issue is defaultContent won't be used since you have "render" defined.
Reference: https://datatables.net/reference/option/columns.render
Since you have render defined, just add your "default" behavior in there.
Example:
I haven't tested it, but this should do what you want it to do.
Hi @gsolai007 ,
The best bet would be to not use default content, but change the global value - see example here (look at Ashton Cox). This solution came from this thread here.
Cheers,
Colin
Thanks @colin