Permalink
Browse files

fixed issue where hours could get below zero

  • Loading branch information...
koenpunt committed May 8, 2012
1 parent 8dc6327 commit 173bdb9261f3a15b6f55a86c7e6f71ee18b1d2da
Showing with 8 additions and 8 deletions.
  1. +8 −8 js/bootstrap-timepicker.js
View
@@ -224,16 +224,16 @@
}
, decrementHour: function() {
- if (this.hour === 1) {
- if ( this.showMeridian ){
+ if ( this.showMeridian ){
+ if (this.hour === 1) {
this.hour = 12;
- this.toggleMeridian();
- } else {
- this.hour = 0;
- }
- } else {
- this.hour = this.hour - 1;
+ return this.toggleMeridian();
+ }
+ }
+ if (this.hour === 0) {
+ return this.hour = 23;
}
+ this.hour = this.hour - 1;
}
, incrementMinute: function() {

0 comments on commit 173bdb9

Please sign in to comment.