Permalink
Browse files

Merge pull request #86 from pedroma/fix_modal_widget_placement_IE

Add a new option appendWidgetTo
  • Loading branch information...
2 parents 1f204ef + eeada30 commit 7aabd3ce63c1ea5f15730618f218e4d5097ff86d @jdewit committed Feb 16, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/bootstrap-timepicker.js
@@ -26,6 +26,7 @@
this.showMeridian = options.showMeridian;
this.showSeconds = options.showSeconds;
this.template = options.template;
+ this.appendWidgetTo = options.appendWidgetTo;
this._init();
};
@@ -65,7 +66,7 @@
}
if (this.template !== false) {
- this.$widget = $(this.getTemplate()).appendTo(this.$element.parents('.bootstrap-timepicker')).on('click', $.proxy(this.widgetClick, this));
+ this.$widget = $(this.getTemplate()).appendTo(this.$element.parents(this.appendWidgetTo)).on('click', $.proxy(this.widgetClick, this));
} else {
this.$widget = false;
}
@@ -859,7 +860,8 @@
showSeconds: false,
showInputs: true,
showMeridian: true,
- template: 'dropdown'
+ template: 'dropdown',
+ appendWidgetTo: ".bootstrap-timepicker"
};
$.fn.timepicker.Constructor = Timepicker;

0 comments on commit 7aabd3c

Please sign in to comment.