i have a link on which i am opening a webpartpage embed in SharePoint ModalDialog. Inside webpart I have a textbox contains jquery.datepicker ..whenever i select the date the ribbons title scrolls up of dialogbox. I just figured out that if i place the following line in masterpage without the tag scroll="no"

<body onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master" style="background-color: #F6F6F6">

I get two scroll bars like this (notice the extreme right) and when i select the date it actually scrolls up the ribbon and i need to go up again using the extreme right vertical scroll bar...but if put scroll="no" tag in box I only get 1 scroll bar the extreme right not the inside one..so when select the date and ribbon gets shifted up a little i cannot go up due to no scroll bar. how to fix this thing..I have fixed width master page design.

without scroll="no" directive in body tag (note two vertical scroll bars at right hand) enter image description here

with scroll="no" in body tag (note single scroll bar at right hand) enter image description here

here is my JQUERY in webpart.

<script type="text/javascript">
$(function () { 

$(function () { 
   var prm = Sys.WebForms.PageRequestManager.getInstance(); 
   prm.add_endRequest(function () { 

function BindEvents() { 

  var $ = jQuery.noConflict(); 

   $('input[id*="txtftrNeededBy"]').datepicker({ dateFormat: 'dd-M-y', changeMonth: true, minDate: 0 });
   $('input[id*="txtNeededBy"]').datepicker({ dateFormat: 'dd-M-y', changeMonth: true, minDate: 0 });
   $('input[id*="txtftrQty"]').autoNumeric({ aSep: '', vMax: '999999', vMin: '0', wEmpty: 'zero', mDec: null });
   $('input[id*="txtQty"]').autoNumeric({ aSep: '', vMax: '999999', vMin: '0', wEmpty: 'zero', mDec: null });
  • oh i just figured..its working fine in Mozilla firefox but happening weird in IE :(
    – user342944
    Commented Dec 12, 2012 at 14:35
  • Finally figured out the culprit but need assistance here to fix my problem :) see my edited question again
    – user342944
    Commented Dec 12, 2012 at 15:44

3 Answers 3


there is a bug in jquery.ui.datepicker.js ..did the following to eliminate the weird scroll up behaviour.


Line 1498: '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date


Line 1498: '" href="javascript:;">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date

Reference url : http://bugs.jqueryui.com/ticket/5981


what version jquery and jquery ui did you use?


Check the page's document type tag to make sure it is set and is set to a valid value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.