fn.dataTable.moment with additionnal info

fn.dataTable.moment with additionnal info

PandalexPandalex Posts: 32Questions: 8Answers: 1

Hi everyone.
I got an issue and I need your help.

I've got a datatable with some columns (it's not my code so I have limited possibilties to modify it).
The first column, I have a date like '31/02/2021'.

I added $.fn.dataTable.moment('DD/MM/YYYY'); and the sorting is working fine.

But I also have a column with a date and additionnal information :

'01/02/2021 - Link to something'

This field is not considered a date so the sorting is alphabetical which is not what I want obviously.

Unfortunately I NEED to have those 2 infos in the same row.

=>
tab[14] contains my date.

<td style='text-align: center; vertical-align: middle;'title='"+tab[15][i]+"'>" + tab[14][i] + "
<A HREF='https:/xxxxxx?epat_id=" + tab[5][i] + "' TARGET='_blank'> All appointements </A></td>

Is there a way to let him now that this field starts with a date ?

Thanks

Answers

Sign In or Register to comment.