aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-09-16 11:58:05 -0400
committerScott González <scott.gonzalez@gmail.com>2013-09-16 11:58:05 -0400
commit134fcafddac25b8e81160718fec59c39e7c76c59 (patch)
treed76227f0a11d24b1e72f7dfb294c89e2251e553b /ui/jquery.ui.spinner.js
parentbdfe7196a2b14d0970de30fe5cb6a45bc87e0b93 (diff)
parentd13df39e39010bb7cf2cec11b5206e85ea5fca2a (diff)
downloadjquery-ui-134fcafddac25b8e81160718fec59c39e7c76c59.tar.gz
jquery-ui-134fcafddac25b8e81160718fec59c39e7c76c59.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index c022413dc..a4912fc7e 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -418,6 +418,18 @@ $.widget( "ui.spinner", {
});
},
+ isValid: function() {
+ var value = this.value();
+
+ // null is invalid
+ if ( value === null ) {
+ return false;
+ }
+
+ // if value gets adjusted, it's invalid
+ return value === this._adjustValue( value );
+ },
+
// update the value without triggering change
_value: function( value, allowAny ) {
var parsed;