• Resolved Gadasoft

    (@gadasoft)


    Hello,

    i have installed the sorting plugin, entered “columnDefs”: [ { “type”: “formatted-num”, “targets”: [ 5 ] } ] as custom command to try and force the date format, yet it still refuses to sort. E.g. 01.12.2017 goes before 25.11.2017.

    Any idea what i am doing wrong ?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    formatted-num is the wrong type. You want to use date-eu.

    Regards,
    Tobias

    Thread Starter Gadasoft

    (@gadasoft)

    Is it possible that its conflicting with the Table Row Order plugin ? Im using the following code to sort by Column F ( the date column ). It seems to be sorting correctly when i press the column arrow, but not automaticaly as it should ??

    row_order=sort row_order_sort_column=F row_order_sort_direction=DESC

    Sorry to be a bother and thank you so much for your time !

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    indeed, the Table Row Order Extension works differently, it does not take these commands into account (it doesn’t use JavaScript).
    Instead, you could use the “Custom Command”:

    "columnDefs": [ { "type": "date-eu", "targets": [ 5 ] } ], "order": [[ 5, 'asc' ]]
    

    Regards,
    Tobias

    Thread Starter Gadasoft

    (@gadasoft)

    That works perfectly, thank you so much for your time and have a great weekend. Will see to support your work !

    Plugin Author TobiasBg

    (@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 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting Dates’ is closed to new replies.