jQuery ui datepicker positioning problem when scrolling down webpage

前端 未结 10 1185
野的像风
野的像风 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:49

    Hey here is one hack which can we be used to solve this issue.

    $(".ui-datepicker-trigger").on("click", function() {
    var self;
    if ($.browser.msie) {
    self = $(this);
    $("#ui-datepicker-div").hide();
    setTimeout(function(){
    $("#ui-datepicker-div").css({
    top: self.offset().top + $('html').scrollTop() + 30
    });
    $("#ui-datepicker-div").show();
    }, 0); 
    }
    }); 
    

    Give a try it worked for me :)

提交回复
热议问题