Custom sorting

Custom sorting

ivchoooivchooo Posts: 8Questions: 5Answers: 0

Hi, I have a column with a month as text (June,July ...). Can I perform some custom sorting(from January to December) instead of alphabetic order.

Answers

  • ivchoooivchooo Posts: 8Questions: 5Answers: 0

    I think that jQuery.fn.dataTableExt.oSort sort only record on current page

  • minde281minde281 Posts: 1Questions: 0Answers: 0

    Very late response, but you should be able to do add a custom number on the <td> that prints the month:

    <td data-order="6">June</td>
    ...
    <td data-order="7">July</td>
    This should make the autosorting use the number in "data-order" over the text.

This discussion has been closed.