Skip to content

Commit

Permalink
jdewit#35 Bug in updateFromWidgetInputs()
Browse files Browse the repository at this point in the history
  • Loading branch information
ssharunas committed Sep 1, 2012
1 parent 6cbb66c commit 88fd193
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/bootstrap-timepicker.js
Expand Up @@ -338,6 +338,8 @@
} else {
if (this.hour >= 24) {
this.hour = 23;
} else if (this.hour < 0) {
this.hour = 0;
}
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 88fd193

Please sign in to comment.