• Resolved gtexeira

    (@gtexeira)


    My tables were sorted correctly all year but with the new year, the first month is at the bottom. So now the top row is 12/1/2019 followed by 11/1/2019 and so on until the bottom with 1/1/2020.

    The page has [table id=53 row_order=sort row_order_sort_column=A row_order_sort_direction=DESC /]. I do not have any custom commands applied.

    I have the following tables plugins.

    TablePress Version 1.10
    TablePress Extension: Change DataTables strings Version 1.2
    TablePress Extension: DataTables Sorting plugins Version 1.0
    TablePress Extension: Table Auto Update Version 1.2
    TablePress Extension: Table Row Order Version 1.2

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    With sorting, you are referring to the TablePress Row Order Extension, from what I can see from your Shortcode. Unfortunately, that does not contain an algorithm for date sorting. Therefore, it was just luck that your dates were in the correct order (simply as the year was the same for all of them).

    In order to continue using the Row Order Extension here, I recommend to either re-format all dates to the yyyy-mm-dd format (which can be sorted just like strings, so that it will be sorted correctly again), or, if that’s not desired, add an extra column to the table, where you add the dates a second time, in exactly that format yyyy-mm-dd. Then, this column could be used for sorting, while it can be hidden from the visitor, so that they still see the desired mm/dd/yyyy date format.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Date sorting not working with new year 2020’ is closed to new replies.