-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Hi, guys. i've an issue in which i can't sort by with a custom converter named 'dateARG' in my code, it keeps sorting by string i think.
The format of my custom Date is in format 'DD/MM/YYYY'.
HTML
<th data-column-id="dateARG" data-converter="dateARG"><spring:message code="common.date"/></th>
JS
var table = $("#movementsTable").bootgrid({ caseSensitive: false, converters: { dateARG: { from: function (value) { // converts from string to dateARG return moment(value, "DD/MM/YYYY"); }, to: function (value) { // converts from dateARG to string return moment(value, "DD/MM/YYYY").format("DD/MM/YYYY"); } } } });
the resulting order is:
25/01/2016
27/05/2016
27/05/2016
29/01/2016
Any ideas what could be wrong? Thx!
pd: i'm appending rows with the append() method in client-mode