From 3228ddab69ee6af8808d6be377e532ef0da5a563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Brli=C5=A5?= Date: Sun, 27 Dec 2015 22:58:33 +0100 Subject: [PATCH] correct parsing of column number --- Scripts/bootstrap-sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/bootstrap-sortable.js b/Scripts/bootstrap-sortable.js index d14153c..87cbc51 100644 --- a/Scripts/bootstrap-sortable.js +++ b/Scripts/bootstrap-sortable.js @@ -70,7 +70,7 @@ $this.find('th').each(function() { var $header = $(this); if ($header.attr('data-dateformat') !== undefined && momentJsAvailable) { - var colNumber = $header.attr('data-sortcolumn'); + var colNumber = parseFloat($header.attr('data-sortcolumn')); $this.find('td:nth-child(' + (colNumber + 1) + ')').each(function() { var $cell = $(this); $cell.attr('data-value', moment($cell.text(), $header.attr('data-dateformat')).format('YYYY/MM/DD/HH/mm/ss'));