diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-11-16 12:07:33 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-11-16 12:07:46 -0500 |
commit | 924e80e576e098fd07899bc6e2d5929680d54446 (patch) | |
tree | 92b9a20255df56ad997e41ace4817705cc7d2324 /ui/jquery.ui.spinner.js | |
parent | 97bc2d9de9875e222254cfa1cd3fa3bde605c2ed (diff) | |
download | jquery-ui-924e80e576e098fd07899bc6e2d5929680d54446.tar.gz jquery-ui-924e80e576e098fd07899bc6e2d5929680d54446.zip |
Spinner: Handle changes to numberFormat and currency options.
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r-- | ui/jquery.ui.spinner.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 9c554b2df..5623722db 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -311,6 +311,13 @@ $.widget( "ui.spinner", { }, _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + this._super( "_setOption", key, value ); if ( key === "disabled" ) { |