Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Meitar

    (@meitar)

    Numeric sorting is built-in to DataTables:

    The main DataTables package includes sorting functions for strings, dates, numeric and currency data

    If DataTables can detect a numeric column, there’s nothing you need to do to enable numeric sorting.

    If a column isn’t sorting as you’d expect, double check your column data to ensure it is uniformly of the correct type. (Don’t let a letter sneak into a numeric column, and so on.)

    Thread Starter Max Beta

    (@max-beta)

    Ok, should that also work with negative values?

    I saw that when I change cells to numeric format in Google they get a longer minus dash and that’s when the sorting stopped working.

    Plugin Author Meitar

    (@meitar)

    I believe so. Either way, the client-side sort features are a part of the DataTables library, not the WordPress plugin itself. Your solution will be found there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting numerically’ is closed to new replies.