ember-cli-bootstrap-datepicker icon indicating copy to clipboard operation
ember-cli-bootstrap-datepicker copied to clipboard

Wrong arrow orientation/position

Open stefanbruvik opened this issue 9 years ago • 10 comments

Seems the arrow is pointing in the wrong direction. This happens whether orientation is set to auto or to something explicitly:

datepicker

Html output: html

Now, if I manually edit this html in dev tools, and change datepicker-orient-bottom to datepicker-orient-top, the arrow points in the correct direction:

datepicker2

Setting the orientation explicitly to top left in my code, yields unwanted results, though:

datepicker3

stefanbruvik avatar May 18 '16 13:05 stefanbruvik

Same Issue when I try to use this inside bootstrap modal where also top is set to 0 instead of that particular input position top . Any fix to this would be great to continue using this plugin. Thanks :+1:

prasannatm avatar Jun 09 '16 07:06 prasannatm

I also encountered this problem.

eventpromo avatar Jul 29 '16 10:07 eventpromo

I have the same issue

AlfaroLore avatar Nov 07 '16 16:11 AlfaroLore

I have the same issue

stephane-lapointe avatar Nov 08 '16 18:11 stephane-lapointe

I have the same issue, I don't have a solution to correct that arrow direction, I just remove it by removing below-shown codes from the .css file, waiting for a final solution from others: .datepicker-dropdown:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #999; border-top: 0; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; } .datepicker-dropdown:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; border-top: 0; position: absolute; } .datepicker-dropdown.datepicker-orient-left:before { left: 6px; } .datepicker-dropdown.datepicker-orient-left:after { left: 7px; } .datepicker-dropdown.datepicker-orient-right:before { right: 6px; } .datepicker-dropdown.datepicker-orient-right:after { right: 7px; } .datepicker-dropdown.datepicker-orient-bottom:before { top: -7px; } .datepicker-dropdown.datepicker-orient-bottom:after { top: -6px; } .datepicker-dropdown.datepicker-orient-top:before { bottom: -7px; border-bottom: 0; border-top: 7px solid #999; } .datepicker-dropdown.datepicker-orient-top:after { bottom: -6px; border-bottom: 0; border-top: 6px solid #fff; }

machinefriendly avatar Dec 18 '16 21:12 machinefriendly

@machinefriendly I have the same issue and remove the arrow as well. There is an easier way to achieve this without the need to modify the original CSS-file. Just add the following CSS and the arrow shouldn't be displayed anymore:

.datepicker-dropdown:after, .datepicker-dropdown:before { display: none !important; }

joelklingler avatar Apr 24 '17 08:04 joelklingler

I found a way to fix it without the need to modify any css. I had the same issue as @stebru described. Using the datepicker-orient-top-class the arrow was pointing in the wrong direction. When I modified the html and replaced the class with datepicker-orient-bottom it worked as desired.

The following JS modifies the classes once the datepicker is shown:

$(document).on('show', $('.datepicker').datepicker(), function() {
  $('.datepicker').removeClass('datepicker-orient-top');
  $('.datepicker').addClass('datepicker-orient-bottom');
});

joelklingler avatar Apr 24 '17 08:04 joelklingler

I noticed this behavior when I updated my installation of Bootstrap Datepicker. I updated the .js file but forgot to also update the .css file. I had wrong arrow. Once I updated also the css file to latest version, my arrows work correctly now.

FirstVertex avatar May 04 '17 21:05 FirstVertex

The same issue, I fixed with this css

.datepicker-dropdown.datepicker-orient-bottom:before,
.datepicker-dropdown.datepicker-orient-bottom:after{
    transform: rotate(180deg);
    bottom: 100% !important;
}

voeurnchy avatar Jul 06 '17 04:07 voeurnchy

Cross-browser and for top orientation: .datepicker-dropdown.datepicker-orient-bottom:before, .datepicker-dropdown.datepicker-orient-bottom:after, .datepicker-dropdown.datepicker-orient-top:before, .datepicker-dropdown.datepicker-orient-top:after { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); }

.datepicker-dropdown.datepicker-orient-bottom:before, .datepicker-dropdown.datepicker-orient-bottom:after { bottom: 100% !important; } .datepicker-dropdown.datepicker-orient-top:before, .datepicker-dropdown.datepicker-orient-top:after { top: 100% !important; }

InaFK avatar Jul 20 '17 09:07 InaFK