kekeh / angular-mydatepicker

Angular datepicker and date range picker :date:
https://kekeh.github.io/angular-mydatepicker/
MIT License
1 stars 11 forks source link

`position: relative` can mess up the layout #8

Closed fidian closed 5 years ago

fidian commented 5 years ago

I have a fairly broad CSS reset/normalize/what-have-you that contains the following rule.

* {
    position: relative
}

This really helps when we want to absolutely position elements. However, this breaks with angular-datepicker. Specifically, <lib-angular-mydatepicker-calendar> needs to be position: static, otherwise the calendar drop-down doesn't align correctly. I think the best fix is to use HostBinding('style.position') position = 'static' or something similar in the component to ensure that this always has a working value.

Additionally, the .ng-mydp class should have position: static.

kekeh commented 5 years ago

Thanks, I have fixed it in version 0.1.3.