Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Dec 15, 2017
2 parents d480f66 + 74e93c6 commit ff9dcb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/css/tempusdominus-bootstrap-4.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
display: block;
margin: 2px 0;
padding: 4px;
width: 12.8vw; }
width: 12.8rem; }
@media (min-width: 576px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em; } }
Expand Down
8 changes: 4 additions & 4 deletions src/js/tempusdominus-bootstrap-4.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@ const TempusDominusBootstrap4 = ($ => { // eslint-disable-line no-unused-vars
self.widget.removeClass('float-right');
}

// find the first parent element that has a static css positioning
if (parent.css('position') !== 'static') {
// find the first parent element that has a relative css positioning
if (parent.css('position') !== 'relative') {
parent = parent.parents().filter(function () {
return $(this).css('position') === 'static';
return $(this).css('position') === 'relative';
}).first();
}

if (parent.length === 0) {
throw new Error('datetimepicker component should be placed within a static positioned container');
throw new Error('datetimepicker component should be placed within a relative positioned container');
}

self.widget.css({
Expand Down

0 comments on commit ff9dcb8

Please sign in to comment.