• Resolved taro0904

    (@taro0904)


    Hallo Tobias,

    erstmal vielen Dank für das tolle Tool. Bin begeistert, aber habe folgendes Problem:

    es geht um folgende Tabelle: https://weggebucht.de/terminuebersicht/

    Ich m?chte diese Tabelle nach Anreisedatum (1. Spalte) ausgeben.
    Allerdings wird wohl nur nach Tag sortiert und der Monat und Jahr nicht berücksichtigt.

    Ich habe folgende Extensions installiert: (keine ?nderungen irgendwo vorgenommen.
    DataTables Sorting plugins
    DataTables TableTools
    Table Row Order

    Zum einfügen der Tabelle habe ich folgenden shortcode benutzt:
    [table id=1 row_order=”sort” row_order_sort_column=”A” row_order_sort_direction=”random” /]

    Vielen Dank für Deine Hilfe
    Tanja

    https://www.ads-software.com/plugins/tablepress/

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

    (@tobiasbg)

    Hi Tanja,

    thanks for your post, and sorry for the trouble.
    As these are the English-language WordPress forums, I’ll reply in English. That way, more users can benefit from our discussion. I hope that’s ok.

    The TablePress Row Order Extension does not work with German dates, unfortunately, as it operates on the server side only. It will therefore not be helpful for this requirement.

    If you don’t want to manually sort the table on the “Edit” screen, you could force a sorting using the DataTables JS library. For that, it should be sufficient to add this to the “Custom Commands” (“Eigene Befehle”) text field on the “Edit” screen of the table:

    "aaSorting": [[0, 'asc']]

    That wil then perform an automatic sorting on the first column.

    Additionally, you should then remove the extra Shortcode parameters again.

    Also, likely from copy/paste, there are some extra HTML tags around your Shortcode that break your table’s styling. To fix that, please go to the “Edit” screen of the page with the table, and switch from the “Visual” to the “Text” editor in the upper right corner of the editor. There, remove the

    <pre class="text">

    and

    </pre>

    around the table Shortcode.

    Regards,
    Tobias

    Thread Starter taro0904

    (@taro0904)

    Dear Tobias,

    thank you for your reply.
    I′ve done what you told me, and the problem with the forced sorting is solved, but if you scroll down the table, you will see that the dates are not sorted correctly:

    For examle:
    02.10.2015
    02.12.2014
    03.01.2016
    03.02.2015
    03.03.2015
    03.04.2015
    03.10.2014

    Its only sorted by the day- not the month and year.

    Best Regards
    Tanja

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Tanja,

    that’s great progress, already. Very nice!

    As it seems, the automatic detection of the date format is not working, so that we’ll have to to set it manually. For that, please extend the “Custom Command” to

    "aoColumnDefs": [ { "sType": "date-eu", "aTargets": [ 0, 1 ] } ], "aaSorting": [[0, 'asc']]

    Regards,
    Tobias

    Thread Starter taro0904

    (@taro0904)

    I solved the problem with:

    “aoColumnDefs”: [ { “sType”: “date-eu”, “aTargets”: [ 4 ] } ]

    now it works :-))

    Thread Starter taro0904

    (@taro0904)

    haha you were faster ??
    And I had a mistake in my post.

    Thank you !!!

    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 ‘Sortierung nach Datum falsch’ is closed to new replies.