Skip to content

Commit 53d6f2b

Browse files
committed
Ad currency detection.
1 parent 80f2254 commit 53d6f2b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

grid-type/detection.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
type = "string";
2020

2121
tbody.children().each( function() {
22-
var cell = $( this.cells[index] ).text();
23-
if ($.global.parseDate(cell)) {
22+
var cell = $( this.cells[ index ] ).text();
23+
if ( $.global.parseDate( cell ) ) {
2424
type = "date";
25-
} else if ($.global.parseFloat(cell)) {
26-
// add check for currency symbol(s) to detecht currency
25+
} else if ( $.global.parseFloat( cell ) ) {
2726
type = "number"
27+
if ( cell.indexOf( $.global.cultures["default"].numberFormat.currency.symbol ) > -1) {
28+
type = "currency";
29+
}
2830
}
2931
});
3032

0 commit comments

Comments
 (0)