• Resolved dabir0070

    (@dabir0070)


    I have a table with Column B containing date values in form “Saturday 10 May, 2014″. I used this:- [table id=4 row_order=”sort” row_order_sort_column=”B” row_order_sort_direction=”DESC”/] but I find the sorting was alphabetical. I also tried direction with “DATE”.

    In the browser, clicking on Date column, sorts it correctly. How can I make this the default. The table is at the end of the homepage http://www.tarbiyyat.org.uk

    Many thanks for the plug in – I was using fileaway, but this is much better.

    https://ww.wp.xz.cn/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The Table Row Order Extension can only sort alphabetically, it does not have other algorithsm, like for date sorting.

    So, instead of using that here, you can tell the DataTables JS library to perform an initial sort when the page is loaded. For that, just add this to the “Custom Commands” textfied on the “Edit” screen of the table:

    "order": [[ 1, 'desc' ]]

    (The 1 refers to the second column as counting starts with 0 in the code.)

    Regards,
    Tobias

    Thread Starter dabir0070

    (@dabir0070)

    Brilliant – that fixed it! I used ‘asc’. Thank you coming your way …

    Thread Starter dabir0070

    (@dabir0070)

    How do you reply so quick and fix so quick? Do you not sleep?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!
    Haha, no, I do sleep 🙂 But I just happen to check the forums often.

    Best wishes,
    Tobias

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

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sort Date order’ is closed to new replies.