Skip to content
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: automatic positioning #4406

Closed
fxck opened this issue May 6, 2017 · 3 comments · Fixed by #4696
Closed

datepicker: automatic positioning #4406

fxck opened this issue May 6, 2017 · 3 comments · Fixed by #4696
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix

Comments

@fxck
Copy link
Contributor

fxck commented May 6, 2017

image

it should open up when there's not enough space at the bottom, otherwise it's gonna be completely unaccessible

@kara kara added the feature This issue represents a new feature or feature request rather than a bug or bug fix label May 9, 2017
@kara
Copy link
Contributor

kara commented May 9, 2017

@fxck This component is still on a feature branch (WIP), so it's likely @mmalerba simply hasn't implemented fallback positions yet.

@crisbeto
Copy link
Member

crisbeto commented May 17, 2017

Reassigning as discussed with @mmalerba. Also to continue the discussion from #4627, I've looked into it a bit and there are a couple of issues:

  1. We haven't set up the fallback positions for the datepicker.
  2. Even if we had set up the fallback position, the ConnectedPositionStrategy measures the element too early and won't determine the proper positioning.

crisbeto added a commit to crisbeto/material2 that referenced this issue May 20, 2017
* Adds fallback positions to the datepicker popup, allowing it to reposition in the cases where it would've gone outside the viewport.
* Fixes an issue that prevented the datepicker from the being positioned properly on the first open due to the calendar not being rendered yet.
* Adds a scroll strategy to reposition the datepicker when the user scrolls away.
* Switches to using `ngSwitch` instead of `ngIf` when determining which view to render.

Fixes angular#4406.
tinayuangao pushed a commit that referenced this issue May 26, 2017
* feat(datepicker): popup positioning improvements

* Adds fallback positions to the datepicker popup, allowing it to reposition in the cases where it would've gone outside the viewport.
* Fixes an issue that prevented the datepicker from the being positioned properly on the first open due to the calendar not being rendered yet.
* Adds a scroll strategy to reposition the datepicker when the user scrolls away.
* Switches to using `ngSwitch` instead of `ngIf` when determining which view to render.

Fixes #4406.

* chore: unused imports
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants