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

Add window constraint, move arrow when needed #130

Merged
merged 4 commits into from
Jul 8, 2015

Conversation

ntdb
Copy link
Contributor

@ntdb ntdb commented Jul 1, 2015

I found that I needed to add the window constraint to the popover to keep the datepicker on-screen when there's not enough space below the input. I also implemented styles to move the arrow to the bottom of the datepicker when the popover moves above the input (should resolve #29).

Note that Tether does not currently reverse offsets when the window constraint triggers (see shipshapecode/tether#85): this means the arrow spacing will be inconsistent between the two states.

@martijnrusschen
Copy link
Member

Nice work! We could probably work a little bit on the positioning of the element when it's positioned to the top, but that's future work. Can you fix the merge conflicts so I can merge your PR?

@ntdb
Copy link
Contributor Author

ntdb commented Jul 8, 2015

@martijnrusschen Thanks! Agreed, this is essentially an minimum viable implementation for my use case. There's lots of room to leverage Tether to a greater extent.

martijnrusschen added a commit that referenced this pull request Jul 8, 2015
Add window constraint, move arrow when needed
@martijnrusschen martijnrusschen merged commit a9df59a into Hacker0x01:master Jul 8, 2015
@martijnrusschen
Copy link
Member

Thanks again, I'll look into it soon!

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

Successfully merging this pull request may close these issues.

Show the arrow on the correct side of the datepicker
2 participants