TWEagle / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

$.dpConst.POS_RIGHT and datePickerMultiMonth #280

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

an input that is positioned to the right of a page and has datePickerMultiMonth 
applied. The multiple calendars will not float corectly

What is the expected output? What do you see instead?

The multiple calendars will not float correctly. by positioning the container 
with the "right" property rather than "left" this will not be a problem 

Please provide a URL to a page displaying the problem.

http://paulwelsh.info/sandbox/datePicker/index.html

note: examples are at the very bottom of the page

What version of the datepicker are you using? On what operating system? And 
Which Browser?

jquery.datePicker-2.1.2.js and all browsers/operating systems

Please provide any additional information below.

by adding the below code after LINE 924 in jquery.datePicker.js:

if (this.horizontalPosition == $.dpConst.POS_RIGHT_MULTI) {
    $pop.css({"right": $(window).width() - Math.round(eleOffset.left + $ele.outerWidth()), "left":"auto"});
}

you can then use POS_RIGHT_MULTI to position the input based on the "right" 
property rather than "left"

Original issue reported on code.google.com by welshy1...@gmail.com on 9 May 2011 at 4:43

GoogleCodeExporter commented 9 years ago
if fact, make that:

if (this.horizontalPosition == $.dpConst.POS_RIGHT_MULTI) {
    $pop.css({"right": $(window).width() - Math.round(eleOffset.left + $ele.outerWidth()) + c.horizontalOffset, "left":"auto"});
}

so that it can still use the "horizontalOffset" setting

Original comment by welshy1...@gmail.com on 9 May 2011 at 5:07