The datepicker in jQueryUI renders with a dynamic position. It renders according to its css if there\'s enough room for it, but if there isn\'t enough window space it tries
here is a more simple solution
var $picker = $( ".myspanclass" ).datepicker(); // span has display: inline-block $picker.find('.ui-datepicker').css('margin-left', '-50px');