From c2f036277c6190bc8677bc0eac53c22ed5e8a08d Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 28 Sep 2011 18:30:58 -0400 Subject: Spinner: Added culture option. --- ui/jquery.ui.spinner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 09df97be7..31de2c9da 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -30,6 +30,7 @@ $.widget( "ui.spinner", { defaultElement: "", widgetEventPrefix: "spin", options: { + culture: null, incremental: true, max: null, min: null, @@ -320,7 +321,8 @@ $.widget( "ui.spinner", { _parse: function( val ) { if ( typeof val === "string" && val !== "" ) { - val = window.Globalize && this.options.numberFormat ? Globalize.parseFloat( val ) : +val; + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; } return val === "" || isNaN( val ) ? null : val; }, @@ -330,7 +332,7 @@ $.widget( "ui.spinner", { return ""; } return window.Globalize && this.options.numberFormat ? - Globalize.format( value, this.options.numberFormat ) : + Globalize.format( value, this.options.numberFormat, this.options.culture ) : value; }, -- cgit v1.2.3