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

[Request] Add a direction prop to set which way the picker opens #171

Open
MrLeebo opened this issue Oct 19, 2016 · 11 comments
Open

[Request] Add a direction prop to set which way the picker opens #171

MrLeebo opened this issue Oct 19, 2016 · 11 comments

Comments

@MrLeebo
Copy link
Contributor

MrLeebo commented Oct 19, 2016

This is a new feature request. If you position the Datetime control towards the bottom of the page, the picker will appear below it and off the page entirely, forcing the user to scroll before they can make a selection. I hope it would not be too much trouble to add a direction prop which could take oneOf(['up', 'down', 'left', 'right']) and position the picker in that direction relative to the input.

<Datetime direction="up" />
@simeg
Copy link
Collaborator

simeg commented Oct 19, 2016

Hi @MrLeebo. I've also had the specific problem you are mentioning, you can solve it using JS. Maybe even HTML using an anchor? But about your suggestion, I think the idea is good. If you'd like to create the code I'd be happy to review the PR.

@MrLeebo
Copy link
Contributor Author

MrLeebo commented Oct 20, 2016

I created the issue because I don't think I have time to learn the repo and implement this right now, but if that changes I will open up a PR.

@danosborne
Copy link

+1

Will also try to spin up a PR...

@simeg
Copy link
Collaborator

simeg commented Nov 9, 2016

A tip: use react-date-playground for development (check the README).

@danosborne
Copy link

Hacked for 5 mins and opened the PR above. Are people happy with the approach?

If so I will tidy it up and actually follow the contributing guidelines etc. ;-)

@Krzyku
Copy link

Krzyku commented Jun 2, 2017

For me direction prop is misleading. I understand direction as left-to-right or right-to-left settings.
Maybe position is better idea for name of this feature?

@bjbrewster
Copy link

I agree. Bootstrap Popover/Tooltip/Overlay uses prop placement with values top, bottom, left and right. Can we use the same prop name with top and bottom?

@simeg
Copy link
Collaborator

simeg commented Nov 5, 2017

placement sounds good to me. Will try to find time for looking into this soon.

@kostiantyn-solianyk
Copy link

any updates?

@Bramgus12
Copy link

Is there a workaround to get the date picker above the input field?

@jvnlwn
Copy link

jvnlwn commented Sep 6, 2022

To move the date picker above the input, just add bottom: 100%; style to the . rdtPicker class. (Caveat in case it matters: this is version 2.14.0 pictured.)

Screen Shot 2022-09-06 at 11 19 39 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants