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

What is the proper way to set datepicker orientation? #561

Closed
first-developer opened this issue Jul 26, 2013 · 6 comments
Closed

What is the proper way to set datepicker orientation? #561

first-developer opened this issue Jul 26, 2013 · 6 comments
Labels

Comments

@first-developer
Copy link

Hi I tried to use the 'orientation' option of the datepicker but it doesn't seem to work.

$(".datepicker").datepicker({
  orientation: "right bottom"
});

Thanks in advance

@eternicode
Copy link
Contributor

"right bottom" should result in the picker showing upward and to the left from the element (the "tooth" that points to the element should be to the bottom-right of the picker).

@neverfox
Copy link

neverfox commented Jun 9, 2014

That's a bit counter-intuitive, isn't it? The first thing that comes to mind for me is that it's the orientation of the calendar relative to the element, not the element relative to the calendar.

@kshipp
Copy link

kshipp commented May 8, 2015

Yes, it's backwards! "Bottom" really means "top". Please, please fix this.

@nikolak
Copy link

nikolak commented Aug 27, 2015

Just stumbled upon this after trying to figure out what's wrong, I agree that it makes more sense for "top" to show the picker, well, on top of the element and not on the bottom.

At the very least the docs should show an example with both code and pictures examples on how to properly use the orientation.

@snaits
Copy link

snaits commented Sep 14, 2016

@Tineyi it has a duplicate, which is fixed: #1406

@vinodv3
Copy link

vinodv3 commented Jun 16, 2018

it's working ......
$(document).ready(function(){
var date_input=$('input[name="date"]'); //our date input has the name "date"
var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
date_input.datepicker({
format: 'mm/dd/yyyy',
container: container,
todayHighlight: true,
autoclose: true,
orientation: "left top",
})
})

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

No branches or pull requests

7 participants