Coder Social home page Coder Social logo

Comments (10)

TobiasBg avatar TobiasBg commented on July 20, 2024

Hi @emiliodallatorre,

in order to use the date-eu data type, you must first download, install, and activate the TablePress Extension from https://tablepress.org/extensions/datatables-sorting-plugins/ as a new plugin on your site.

Regards,
Tobias

from tablepress.

emiliodallatorre avatar emiliodallatorre commented on July 20, 2024

Hi @emiliodallatorre,

in order to use the date-eu data type, you must first download, install, and activate the TablePress Extension from https://tablepress.org/extensions/datatables-sorting-plugins/ as a new plugin on your site.

Regards,
Tobias

You're completely right, I didn't install it.
Is there also a way to select a default sort for a table?

I'm sorry for the useless issue, I will close it ASAP!

from tablepress.

TobiasBg avatar TobiasBg commented on July 20, 2024

Hi @emiliodallatorre,

good to hear that this helped!
To sort by date when the table is loaded, you could extend your "Custom Command" to
"columnDefs": [ { "type": "date-eu", "targets": [ 0 ] } ], "order": [ [ 0, "asc" ] ]

Regards,
Tobias

from tablepress.

emiliodallatorre avatar emiliodallatorre commented on July 20, 2024

Hi @emiliodallatorre,

good to hear that this helped!
To sort by date when the table is loaded, you could extend your "Custom Command" to
"columnDefs": [ { "type": "date-eu", "targets": [ 0 ] } ], "order": [ [ 0, "asc" ] ]

Regards,
Tobias

I wonder that I can achieve reverse sorting by replacing "asc" with "desc" as in Firebase JS query?

from tablepress.

emiliodallatorre avatar emiliodallatorre commented on July 20, 2024

Hi @TobiasBg,
unfortunately I noticed that, after this configuration, table pagination stopped working...
It starts paginating again if I remove the "Custom Command".

from tablepress.

TobiasBg avatar TobiasBg commented on July 20, 2024

Hi @emiliodallatorre,

yes, you can of course also replace "asc" with "desc". Please add the command again, so that I can investigate this in the page.

Regards,
Tobias

from tablepress.

emiliodallatorre avatar emiliodallatorre commented on July 20, 2024

Roger, @TobiasBg: command added.

from tablepress.

TobiasBg avatar TobiasBg commented on July 20, 2024

Hi @emiliodallatorre,

you removed the last ] of your original "Custom Command". Please try again with (exactly)
"columnDefs": [ { "type": "date-eu", "targets": [ 0 ] } ], "order": [ [ 0, "asc" ] ]

Regards,
Tobias

from tablepress.

emiliodallatorre avatar emiliodallatorre commented on July 20, 2024

Hi @emiliodallatorre,

you removed the last ] of your original "Custom Command". Please try again with (exactly)
"columnDefs": [ { "type": "date-eu", "targets": [ 0 ] } ], "order": [ [ 0, "asc" ] ]

Regards,
Tobias

I can confirm this is working, kindly thanks @TobiasBg.

from tablepress.

TobiasBg avatar TobiasBg commented on July 20, 2024

Hi @emiliodallatorre,

great! Thanks for the confirmation!

Best wishes,
Tobias

from tablepress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.