Skip to content
Browse files

Timepicker: Now correctly stops you from entering invalid numbers

  • Loading branch information...
1 parent 2184d1e commit 593b4d758d8d41885b78133470a9e82311e84ca2 @gnarf gnarf committed Sep 22, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/jquery.ui.timepicker.js
View
6 ui/jquery.ui.timepicker.js
@@ -19,21 +19,21 @@
function sixty( value ) {
value = parseInt( value, 10 );
- if ( value >= 0 || value <= 59 ) {
+ if ( value >= 0 && value <= 59 ) {
return ( value < 10 ? "0" : "" ) + value;
}
}
var maskDefinitions = {
hh: function( value ) {
value = parseInt( value, 10 );
- if ( value >= 1 || value <= 12 ) {
+ if ( value >= 1 && value <= 12 ) {
return ( value < 10 ? "0" : "" ) + value;
}
},
HH: function( value ) {
value = parseInt( value, 10 );
- if ( value >= 0 || value <= 23 ) {
+ if ( value >= 0 && value <= 23 ) {
return ( value < 10 ? "0" : "" ) + value;
}
},

0 comments on commit 593b4d7

Please sign in to comment.
Something went wrong with that request. Please try again.