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

Added openPos property resolve issue 'Set opening direction? #347' #874

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

Conversation

moriarty83
Copy link

This update adds functionality to allow the user to pass an openPos prop of 'left' or 'right' (default of 'left') to determine of the calendar originates from the left or right side of the input element. This should help to resolve issue #347 which can cause the calendar to exceed the boundaries of it's parent div if it is close to right edge of the div/screen.

Specifics:

  • Added prop openPos to Datepicker.vue, defaults to 'left'.
  • openPos prop is passed to PickerDay.vue, PickerMonth.vue and PickerYear.vue
  • openPos is then read into the :class of each component and if 'right' a calss of 'open-right' is added to the component.
  • added &&.open-right to the .vdp-datepicker__calendar which sets 'right 0px'.

@Nate603
Copy link

Nate603 commented Mar 2, 2023

seems like a nice feature to have, why no merge xD

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.

None yet

2 participants