Sorting by date (dsc) doesn't work.

Sorting by date (dsc) doesn't work.

BiebBieb Posts: 8Questions: 0Answers: 0
edited February 2012 in General
I have data in a table with dates in the format mm/dd/yyyy hh:mm:ss and manually clicking the column headers to sort works just fine. However when i call:

[code]oTable.fnSort([[0,'dsc']]);[/code]

I get:

[code]
Uncaught TypeError: Property 'date-dsc' of object # is not a function
ijquery.dataTables.js:3866
_fnSortjquery.dataTables.js:3856
DataTable.fnSortjquery.dataTables.js:5846
[/code]



Manual Sorting works correctly:

http://i.imgur.com/Rm4HN.png

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    You need to use "desc" rather than "dsc" (a la SQL)

    Allan
  • BiebBieb Posts: 8Questions: 0Answers: 0
    I'm stupid. -.- Thanks
This discussion has been closed.