Skip to content

Commit

Permalink
correct parsing of column number
Browse files Browse the repository at this point in the history
  • Loading branch information
drvic10k committed Dec 27, 2015
1 parent dfc2e37 commit 3228dda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scripts/bootstrap-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 3228dda

Please sign in to comment.