• Resolved Andy Wallace

    (@awallace39)


    My table used to be sort-able by date in the MM/DD/YYYY format. In the tablepress editor I can still make the date my default sort and it successfully sorts it however, on the actual page when I click to sort by date it is sorting it by the first number (so the month) instead of the actual date. Did something change?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    It seems that the automatic type detection does not pick up the date format. We can however just set it manually. For that, please add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "columnDefs": [ { "type": "date", "targets": [ 3 ] } ]
    

    This should fix the sorting in the fourth column (counting the columns starts with 0).

    Regards,
    Tobias

    Thread Starter Andy Wallace

    (@awallace39)

    Hey Tobias,

    That worked perfectly! Thank you so much for your help!

    Andrew Wallace

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Date Sorting No Longer Working’ is closed to new replies.