How can I get jQuery DataTables to sort on hidden value, but search on displayed value?

后端 未结 9 1621
暖寄归人
暖寄归人 2020-12-08 09:47

I have a simple DataTables grid which contains date columns. I have provided two values for the date in my JSON data set, one for display and one specifically designed so th

9条回答
  •  长情又很酷
    2020-12-08 10:43

    Umm...instead of going through all of this rigmarole just add a hidden span with your "Sort By" to the front:

    2010113113300011/31/2010 1:30 PM
    

    Note: This does mean that they can search by either the hidden or shown value...this may be a consequence you can't live with.

提交回复
热议问题