jQuery ui datepicker positioning problem when scrolling down webpage

前端 未结 10 1175
野的像风
野的像风 2021-01-02 11:30

I have a webpage that uses multiple instances of the jQuery ui datepicker. My webpage will display ~80 records which extends beyond a single screenshot.

<         


        
10条回答
  •  清酒与你
    2021-01-02 11:50

    I had the same problem too, I'm using IE9 but instead to use document.documentElement.scrollTop I edit the follwing line on my JS code

    $.datepicker._pos[1] += input.offsetHeight + document.body.scrollTop;
    

    This is because document.documentElement.scrollTop returns 0, for me the above code solves my problem

提交回复
热议问题