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

Right align calendar on right window edge conflict #546

Merged
merged 1 commit into from Jan 1, 2015
Merged

Right align calendar on right window edge conflict #546

merged 1 commit into from Jan 1, 2015

Conversation

Munter
Copy link
Contributor

@Munter Munter commented Jul 18, 2013

Right align calendar instead of aligning left and nudging when the left aligned calendar would cross the right window edge.

This looks prettier because the right calendar edge aligns with the component and the arrow correctly points to the component.

…ft aligned calendar would cross the right window edge.
@devender85
Copy link

Put this key-value pair in the datetimepicker function
pickerPosition: "bottom-left"

$('.form_date').datetimepicker({

    pickerPosition: "bottom-left"
});

@acrobat
Copy link
Member

acrobat commented Jan 1, 2015

@Munter can you please provide a jsfiddle illustrating the problem? You can use this jsfiddle as base

@Munter
Copy link
Contributor Author

Munter commented Jan 1, 2015

Here you go: http://jsfiddle.net/g02L8z8y/1/

When the input is close to the right window edge, the edge detection sees that, but instead of reversing the alignment to avoid the comflict, it nudges the datepicker until it's inside the window. However the arrow now points at nothing.

datepicker

This patch inverts the alignment in the same situation, causing the date picker to align with the right edge, and the arrow to correctly point at the input

@acrobat
Copy link
Member

acrobat commented Jan 1, 2015

Thanks @Munter!

acrobat added a commit that referenced this pull request Jan 1, 2015
Right align calendar on right window edge conflict
@acrobat acrobat merged commit 71a58a1 into uxsolutions:master Jan 1, 2015
@acrobat acrobat added this to the 1.4.0 milestone Jan 1, 2015
@acrobat acrobat mentioned this pull request Jan 1, 2015
6 tasks
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

3 participants