How to sort date format d / m / y on the boot data plugin?

I use this boot plugin to load data. Everything is fine, but this plugin cannot sort the column with the date (dd / mm / YYYY). The plugin can only be sorted in the format YYYY / mm / dd. So how can I sort the dd / mm / YYYY date format with this plugin?

By the way, I found the plugin code from datatables.net that allows you to sort the dd / mm / YYYY format.

Can someone help me combine (maybe) the original plugin and add the code above? Thanks...

+5
source share
1 answer

in the td tag add a hidden span tag with a date in the format YYYY / mm / dd.

HTML:

<td><span class="hidden">YYYY/mm/dd</span>dd/mm/YYYY</td> 

CSS

 .hidden{display:none} 
+10
source

Source: https://habr.com/ru/post/1206617/


All Articles