From d92ff627048fa376b71f87917914cdc9f4085f9d Mon Sep 17 00:00:00 2001 From: elad Date: Wed, 30 Jul 2014 06:25:41 +0300 Subject: [PATCH] Fix unhandled exception when clicking input addons and don't pad hour. --- js/bootstrap-timepicker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/bootstrap-timepicker.js b/js/bootstrap-timepicker.js index 7c416103..8d438822 100644 --- a/js/bootstrap-timepicker.js +++ b/js/bootstrap-timepicker.js @@ -237,7 +237,7 @@ }, formatTime: function(hour, minute, second, meridian) { - hour = hour < 10 ? '0' + hour : hour; + //hour = hour < 10 ? '0' + hour : hour; minute = minute < 10 ? '0' + minute : minute; second = second < 10 ? '0' + second : second; @@ -664,7 +664,7 @@ }, showWidget: function() { - if (this.isOpen) { + if (this.isOpen || this.template !== 'modal') { return; } @@ -697,7 +697,7 @@ this.updateFromElementVal(); - if (this.template === 'modal' && this.$widget.modal) { + if (this.$widget.modal) { this.$widget.modal('show').on('hidden', $.proxy(this.hideWidget, this)); } else { if (this.isOpen === false) {