-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datepicker-input popup styling #1082
Comments
The positioning styles you are seeing are, well, positioning info we are adding here:
It is needed to make sure that datepicker popup is always positioned exactly right in relation to the input field - regardless of which elements come after If I understand you correctly you would like to have datepicker popup positioned to the right rather than left. In fact we do have |
That would be great. I could try to submit a PR for this but I haven't setup the project so I can do it over the weekend. |
Go ahead and give a shoot at the PR, it should be quite straightforward one. Setup is easy as well: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/DEVELOPER.md |
@pkozlowski-opensource I am actually slightly stuck as I am not sure what approach to take. I've introduce I am also slightly confused as the ng-bootstrap/src/util/positioning.ts Line 108 in a12c559
hence they aren't acutally used in here: ng-bootstrap/src/util/positioning.ts Line 149 in a12c559
The method seems slightly inconsistent to me. |
@alex321 I see, |
@pkozlowski-opensource I am going to pick this on up this weekend. My initial thoughts (based only on my memory of the code): Shall we use 'bottom-left' (i.e. 'position-alignment') and provide the following:
Can support central alignment as well. I can modify the service to do that if this sounds agreeable. I will post any other ideas that come to my mind. |
How could we achieve it, by [position] tag? |
I am interested in using the bootstrap class "dropdown-menu-right" for the dropdown of the datepicker.
However, the popup for the current datepicker receives the following styling:
<ngb-datepicker class="dropdown-menu" style="display: block; padding: 0.4rem; top: 38px; left: 0px">
Are all of these necessary? I can see why
padding: 0.4rem
is necessary but I don't see the reason for the other styles, especiallyleft: 0px
as it prevents me overwriting it from a containing element (unless I use!important
).A followup question would be whether in general the popups could support adding the "dropdown-menu-right" class.
The text was updated successfully, but these errors were encountered: