diff --git a/js/bootstrap-timepicker.js b/js/bootstrap-timepicker.js index 05463221..4639e27b 100644 --- a/js/bootstrap-timepicker.js +++ b/js/bootstrap-timepicker.js @@ -52,7 +52,7 @@ _init: function() { var self = this; - if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-group bootstrap-timepicker'))) { + if (this.showWidgetOnAddonClick && (this.$element.parent().hasClass('input-group') && this.$element.parent().hasClass('bootstrap-timepicker'))) { this.$element.parent('.input-group.bootstrap-timepicker').find('.input-group-addon').on({ 'click.timepicker': $.proxy(this.showWidget, this) }); diff --git a/spec/js/fixtures/timepicker.html b/spec/js/fixtures/timepicker.html index a2714a24..b5b0a2c4 100644 --- a/spec/js/fixtures/timepicker.html +++ b/spec/js/fixtures/timepicker.html @@ -1,4 +1,4 @@ -
+