diff --git a/app/assets/javascripts/app/lib/bootstrap/bootstrap-datepicker.js b/app/assets/javascripts/app/lib/bootstrap/bootstrap-datepicker.js index cf25e7b64..a283eb051 100755 --- a/app/assets/javascripts/app/lib/bootstrap/bootstrap-datepicker.js +++ b/app/assets/javascripts/app/lib/bootstrap/bootstrap-datepicker.js @@ -26,6 +26,7 @@ - allow custom template as options parameter - fix that place method doesn't think that the container is the window, but rather the real window is the window - added rerender method to show correct today if task is longer open the 24 hours + - scroll into view */ (function(factory){ @@ -757,6 +758,16 @@ zIndex: zIndex }); } + + // adjust scroll of scrollParent + var scrollParent = this.picker.scrollParent(); + var bottomEdge = offset.top + height + this.picker.outerHeight(); + var scrollBottomEdge = scrollParent.scrollTop() + scrollParent.height(); + + if(bottomEdge > scrollBottomEdge){ + scrollParent.scrollTop(scrollParent.scrollTop() + (bottomEdge - scrollBottomEdge) + 10); + } + return this; }, diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index b7014b403..02dc6783e 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -3843,6 +3843,7 @@ footer { } .sidebar { + position: relative; width: 280px; padding: 20px; color: hsl(60,1%,34%);