I am using Ronan Guilloux sorting code (although i removed the seconds) and i can set the columns using aoColumnDefs which works with the time as well but id like to not have to set the column so i have been trying to use the following:
But it is not working. the column has the format like this:
The regEx i have above seems to work in tools on the page and i can see that it does match it but then the datetime-uk methods are never called. if i set the aoColumnDefs it does call them and everything works can anyone help?
jQuery.fn.dataTableExt.aTypes.unshift(
function ( sData )
{
if (sData !== null && sData.match(/(0[1-9]|[12]\d|3[0-2])\/(0[1-9]|1[0-2])\/\d{4} (0[1-9]|1\d|2[0-3]):(0[1-9]|[1-5]\d)$/))
{
console.log('datetime-uk');
return 'datetime-uk';
}
return null;
}
);
But it is not working. the column has the format like this:
14/09/2013 11:15
The regEx i have above seems to work in tools on the page and i can see that it does match it but then the datetime-uk methods are never called. if i set the aoColumnDefs it does call them and everything works can anyone help?