Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a new option appendWidgetTo

Added a new option to timepicker allowing for custom placing of the modal widget.
This was needed because of IE7.
  • Loading branch information...
commit eeada3074a4493588859d5543c99fbc63ef34a11 1 parent 8900568
@pedroma pedroma authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/bootstrap-timepicker.js
View
6 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;
Please sign in to comment.
Something went wrong with that request. Please try again.