Date Sorting

Date Sorting

SimonPrice3376SimonPrice3376 Posts: 25Questions: 5Answers: 0
edited October 2016 in Free community support

I am trying to sort based on the example here https://datatables.net/plug-ins/sorting/, and have my example at https://jsfiddle.net/SimonPrice/ndtgtshq/3/.

the problem that I am having that it just isn't working.

I would be grateful to know how I can sort on any \ all of the date fields please.

Any and all help very much appreciated

This question has an accepted answers - jump to answer

Answers

  • SimonPrice3376SimonPrice3376 Posts: 25Questions: 5Answers: 0
    edited October 2016

    removed comments due to editing comments above

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    edited October 2016 Answer ✓

    Hi,

    None of your date / time columns are in the format 'DD, MM, YYYY' that you specify in the code.

    You need to tell the plug-in what format to expect. Moment's documentation contains the formatting options it supports).

    Allan

    edit Fixed typo in Markdown link

  • SimonPrice3376SimonPrice3376 Posts: 25Questions: 5Answers: 0

    ah, I was under the impression that it wanted to know the formats of the day month and year, as to how many 01, vs, 1, vs 1st, rather than the actual formatting DD/MM/YYYY

    thank you

This discussion has been closed.