"order": [[0,'asc']] is not sorting the field

"order": [[0,'asc']] is not sorting the field

karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

i've used the order to sort the date field in my table, it is not able to sort the field in asc order ,it it not populating even in desc
for example i've given a date 1/1/2018,11/1/2019,1/10/2016,1/22/2018
it is displaying as same as entered not in asc or desc ,please help me

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    Are you using a date sorting plug-in such as this one?

    Allan

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    i am using https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js and for sorting i am using "order":[[8,'asc']]
    it is just showing top to bottom(asc)
    and bottom to top order (desc)it is not sorting the field depends on date

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    it is not sorting according to data it is just reversing the data (top to bottom and vice versa ,can u please tell me how to sort the data
    thank you

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Did you read the doc that Allan pointed you too?

    That tells you how.

    Kevin

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    i can see all fields are working fine according to the data but only data fields are not sorting instead of sorting just reversing the data

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Like Allan suggested you need to use a sorting plugin. Follow the steps in the doc he linked to and let use know the results.

    Kevin

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    sure, let you know
    thanks

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    thank you for your help,i can able to format and sort the dates asc and desc , but it is not displaying the data in internet explorer (it is just displaying the blank table -no data)

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    Answer ✓

    but it is not displaying the data in internet explorer (it is just displaying the blank table -no data)

    Do you have any errors in your browser's console?

    Can you provide a link to your page for troubleshooting or a test case showing the issues?

    Kevin

  • karthik3ekarthik3e Posts: 7Questions: 1Answers: 0

    i fixed the issue every thing is working fine @allan ,@kthorngren thank you for your help guys

This discussion has been closed.