Support

Account

Home Forums General Issues Number Field – Outputting and Sorting Negative Numbers Reply To: Number Field – Outputting and Sorting Negative Numbers

  • That has nothing to do with WP or ACF.

    The values are sorted descending as text strings, not numbers.

    “-” is less than “0” when evaluated as a string, that is why the negatives appear at the end. But “-0.77” is greater than “-0.57” when shorted as a string because “7” (ASCII = 55) > “5” (ASCII = 53). It may not be using ACSII, but 7 is always > 5 when evaluated as a string.

    You should probably ask the developer of list.js