Permalink
Browse files

#35 Bug in updateFromWidgetInputs()

  • Loading branch information...
1 parent 6cbb66c commit 88fd19362307727cb68d07d9910d02eb0d6b071e @ssharunas committed Sep 1, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 js/bootstrap-timepicker.js
View
@@ -338,6 +338,8 @@
} else {
if (this.hour >= 24) {
this.hour = 23;
+ } else if (this.hour < 0) {
+ this.hour = 0;
}
}
@@ -489,13 +491,13 @@
}
, updateFromWidgetInputs: function () {
- var time = $('input.bootstrap-timepicker-hour').val() + ':' +
- $('input.bootstrap-timepicker-minute').val() +
+ var time = $('input.bootstrap-timepicker-hour', this.$widget).val() + ':' +
+ $('input.bootstrap-timepicker-minute', this.$widget).val() +
(this.showSeconds ?
- ':' + $('input.bootstrap-timepicker-second').val()
+ ':' + $('input.bootstrap-timepicker-second', this.$widget).val()
: '') +
(this.showMeridian ?
- ' ' + $('input.bootstrap-timepicker-meridian').val()
+ ' ' + $('input.bootstrap-timepicker-meridian', this.$widget).val()
: '');
this.setValues(time);

0 comments on commit 88fd193

Please sign in to comment.