• Resolved brenonline

    (@brenonline)


    Hi there:

    Just started using Table Press. My experience has been good. It’s very easy to use and the table looks great.

    I am having difficulty though getting the date field – the last in a 3 column 75 row table to sort correctly when using that option in the header row.

    Sorting from oldest to newest I have 08/15/2019 displaying before 09/29/2018. This column sorts perfectly in Apple numbers and Google Spreadsheets. It also sorts correctly in the TablePress Table Content section in the back end, just not on the front end of my site. It also sorts correctly on the front end after doing a page refresh.

    I have followed instructions from the TablePress FAQ and installed the TablePress Extension: DataTables Sorting Plugin.

    I have also added the following: “columnDefs”: [ { “type”: “formatted-num”, “targets”: [ 2 ] } ] to the Custom Commands section.

    Not sure what I’m doing wrong.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter brenonline

    (@brenonline)

    Hi Tobias:

    Thank you for the response. The page is password protected. Is there anywhere I could send you a log-in?

    If not I will duplicate the issue on non-protected page.

    Bren

    Thread Starter brenonline

    (@brenonline)

    Hi Tobias:

    I created a non-protected test page so you can see the issue I am having with sorting the table expiration column.

    https://crisisinterventionsolutions.com/tabletest/

    Thanks again,

    B

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks! Please try this modified “Custom Command”:

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

    You can then deactivate the TablePress Sorting Plugins Extension again.

    Regards,
    Tobias

    Thread Starter brenonline

    (@brenonline)

    Hey Tobias:

    That worked perfectly!

    Thanks so much.

    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 6 replies - 1 through 6 (of 6 total)

The topic ‘Date field not sorting correctly’ is closed to new replies.