How can sort the date column along with grouped column

How can sort the date column along with grouped column

polachanpolachan Posts: 101Questions: 50Answers: 0

I have created the report for employee attendance using datatable . The datatable being grouped with depotno and employee and also sorted with the grouping . But I want to show the attendance date as sorted under each depotno, and employee. Please attached the script with attachement

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @polachan ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • polachanpolachan Posts: 101Questions: 50Answers: 0

    Please can you look my testcase on the link given below. I want to sort the column 2,1,4 in the given testcases. Also the date in the 4th column should be shown with dd/mm/yyyy format and it has to be sorted with that format . Please can you help
    "https://jsfiddle.net/7odeLw1z/")

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    Its hard to see if sorting is working with one row per group. Maybe you can add more data points if you need further help. The recommended way to sort by dates is discussed in this blog:
    https://datatables.net/blog/2014-12-18

    Otherwise I believe they are just considered a text field and won't sort the way you expect. Try implementing the solution in the blog into your test case that way if you still have problems we can easily help.

    Kevin

This discussion has been closed.