Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Implement pickerPosition:'auto' option #645

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jarstelfox
Copy link

@jarstelfox jarstelfox commented Mar 28, 2017

This should resolve #209.

Testing:

  • Ensure Date pickers near the bottom of the page do not go off screen and instead open above the input
  • Ensure default positioning of all pickers and their arrows are on the left side of an input
  • Ensure default positioning of all pickers are on the bottom
  • Ensure pickers will adjust position if they will overflow the bottom or left side of the page
  • Ensure pickers stay attached to the input when picker is shown and a page is scrolled, previously it did not update it's position unless window size was changed

Jarred Stelfox added 2 commits March 28, 2017 09:53
Even using the old defaults, 'bottom-right' css is being applied to a datepicker which is created on the left hand side and the arrow is on the left.

Swapping the CSS moves the arrow to the right side even though the name would now be 'bottom-left'. Moveover, the picker would be on the left, but the arrow on the right of the picker.

This should keep this working as is instead of swapping css. I worry changing the CSS would be a breaking change for many people using this library. Even if it seems correct.
@jarstelfox jarstelfox changed the title Jstelfox/implement209 Implement pickerPosition:'auto' option Mar 28, 2017
Jarred Stelfox added 3 commits August 9, 2017 09:00
Offset is not enough when a parent dive has overflow:scroll/auto. We need to calculated the bottom of the document regardless of if we are in a scrollable area.
This will recalculate the auto positioning of a picker when the window is resized.

This includes auto positioning, meaning a picker may flip upwards if the window is resized vertically and there is no room on the bottom of the page for the picker
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic picker postion
1 participant