aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-09-28 18:30:58 -0400
committerScott González <scott.gonzalez@gmail.com>2011-09-28 18:30:58 -0400
commitc2f036277c6190bc8677bc0eac53c22ed5e8a08d (patch)
tree2c254390135d5a48a157aa70ecd8905df0f23ea8 /ui
parent39b452e1be8d6ef9006c26be3495c633d15ff96f (diff)
downloadjquery-ui-c2f036277c6190bc8677bc0eac53c22ed5e8a08d.tar.gz
jquery-ui-c2f036277c6190bc8677bc0eac53c22ed5e8a08d.zip
Spinner: Added culture option.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.spinner.js6
1 files changed, 4 insertions, 2 deletions
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: "<input>",
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;
},