Skip to content

Commit 6a79c70

Browse files
committed
Spinner: Update to latest jquery-global plugin, removing the currency
workaround.
1 parent ca818be commit 6a79c70

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

ui/jquery.ui.spinner.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,14 @@ $.widget('ui.spinner', {
305305
_parse: function(val) {
306306
var input = val;
307307
if (typeof val == 'string') {
308-
// special case for currency formatting until Globalization handles currencies
309-
if (this.options.numberformat == "C" && window.Globalization) {
310-
// parseFloat should accept number format, including currency
311-
var culture = Globalization.culture || Globalization.cultures['default'];
312-
val = val.replace(culture.numberFormat.currency.symbol, "");
313-
}
314-
val = window.Globalization && this.options.numberformat ? Globalization.parseFloat(val) : +val;
308+
val = $.global && this.options.numberformat ? $.global.parseFloat(val) : +val;
315309
}
316310
return isNaN(val) ? null : val;
317311
},
318312

319313
_format: function(num) {
320314
var num = this.options.value;
321-
this.element.val( window.Globalization && this.options.numberformat ? Globalization.format(num, this.options.numberformat) : num );
315+
this.element.val( $.global && this.options.numberformat ? $.global.format(num, this.options.numberformat) : num );
322316
},
323317

324318
destroy: function() {

0 commit comments

Comments
 (0)