I am using jQuery Datatables
with the yadcf
plugin to filter on certain columns and wondered what approach I should use to get the column "Period"
to display the filter in the correct date order.
I can get the Period column to sort OK using a hidden span and a full date ie 01/12/2019
but wondered how I might be able to get the filter to sort on load perhaps?
You can use the sort_as_custom_func
, just set the sort_as: 'custom'
and provide sort_as_custom_func
with your own sorting function, in case of issues you can debug the code a bit to see if your sort function is written properly
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.