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] Inline mode has multiple positioning and transition placement/direction issues #4219

Closed
catamphetamine opened this issue May 9, 2016 · 7 comments
Labels
bug 🐛 Something doesn't work component: date picker This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process

Comments

@catamphetamine
Copy link

Problem description

DatePicker in inline mode is positioned incorrectly.

Steps to reproduce

Go to the demo page http://www.material-ui.com/#/components/date-picker
Scroll down a bit so that Inline section is visible but it should stay at the bottom of the page.
Focus the date picker field.
The date picker component appears sticking to the top of the page.

Versions

  • Material-UI:
  • React:
  • Browser:
@nathanmarks
Copy link
Member

@halt-hammerzeit I don't see your exact problem -- but I see one very similar (it does not stick to the top, but rather opens unnaturally):

  1. Our datepicker is not keyboard accessible (can't focus the input to active it...)
  2. The open transition isn't natural when the datepicker input field is near the bottom of the page. Expanding popovers are supposed to appear to expand from the element you click on rather than the middle of nowhere:

img

@catamphetamine
Copy link
Author

catamphetamine commented May 9, 2016

Yes, that's exactly what I'm talking about: it is supposed to open downwards when you click the input.
But it opens as if the focused field was at the top of the page.
If you don't click cancel and keep on scrolling down then it places itself at the correct position once the space under the input is sufficient.

@catamphetamine
Copy link
Author

Ok, since you know about that issue you can close this github issue whenever you want.
It was just a notification for your team.

@nathanmarks
Copy link
Member

@halt-hammerzeit even the regular implementation is incorrect -- it should cover the text field it is attached to. That's how other popovers on form elements should act according to spec.

Leave this open so we have an issue for it.

@nathanmarks nathanmarks changed the title DatePicker in inline mode is positioned incorrectly. [DatePicker] Inline popover has multiple positioning and transition placement/direction issues May 9, 2016
@nathanmarks nathanmarks changed the title [DatePicker] Inline popover has multiple positioning and transition placement/direction issues [DatePicker] Inline mode has multiple positioning and transition placement/direction issues May 9, 2016
@nathanmarks nathanmarks added bug 🐛 Something doesn't work design: material This is about Material Design, please involve a visual or UX designer in the process labels May 9, 2016
@mbrookes
Copy link
Member

mbrookes commented May 9, 2016

Related: #2966

@mbrookes
Copy link
Member

mbrookes commented May 9, 2016

@halt-hammerzeit What you originally described (dialog sticks to the top of the screen), what @nathanmarks mentioned (animation origin), what you responded with (datepicker position), and @nathanmarks subsequently mentioned (anchor origin) are four different things.

The first I can't reproduce either.
The second is covered by #2968 (but the wording there could be clearer)
The third can be fixed by canAutoPosition={false} in Container in DatePickerDialog.js
The fourth would be fixed by anchorOrigin={{horizontal: 'left', vertical: 'top'}} in the same component, but anchorEl isn't targeting the TextField, so that would need to be addressed as well.

@oliviertassinari oliviertassinari added the component: date picker This is the name of the generic UI component, not the React module! label Oct 19, 2016
@oliviertassinari
Copy link
Member

Closing for #4787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: date picker This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants