From eae6bc4a6facd11f5378a6085047b2416af68c9c Mon Sep 17 00:00:00 2001 From: Cyprien Dufour Date: Mon, 11 Sep 2017 10:35:31 +0200 Subject: [PATCH 1/2] datetimepicker component should be placed within a relative positioned container --- src/js/tempusdominus-bootstrap-4.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/tempusdominus-bootstrap-4.js b/src/js/tempusdominus-bootstrap-4.js index 8f9e031..c605e9f 100644 --- a/src/js/tempusdominus-bootstrap-4.js +++ b/src/js/tempusdominus-bootstrap-4.js @@ -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({ From 49424125160458137a06388510c21f1aa32276bc Mon Sep 17 00:00:00 2001 From: ccoltman Date: Thu, 2 Nov 2017 08:30:37 -0400 Subject: [PATCH 2/2] Change units to rem Bootstrap Beta 2 (and maybe earlier too) uses rem units, this fixes the table width issue. --- build/css/tempusdominus-bootstrap-4.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/css/tempusdominus-bootstrap-4.css b/build/css/tempusdominus-bootstrap-4.css index 31e644e..363fd01 100644 --- a/build/css/tempusdominus-bootstrap-4.css +++ b/build/css/tempusdominus-bootstrap-4.css @@ -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; } }