From 924e80e576e098fd07899bc6e2d5929680d54446 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 16 Nov 2011 12:07:33 -0500 Subject: Spinner: Handle changes to numberFormat and currency options. --- ui/jquery.ui.spinner.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui/jquery.ui.spinner.js') 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" ) { -- cgit v1.2.3