Igorβs answer expands. To position the calendar in the lower right corner of the datepicker input element, use this:
$('.datepicker').datepicker({ beforeShow: function (input, inst) { var offset = $(input).offset(); window.setTimeout(function () { var calWidth = inst.dpDiv.width(); var inpWidth = $(input).width() + parseInt($(input).css('padding')); inst.dpDiv.css({ left: offset.left + (inpWidth - calWidth) + 'px' }) }, 1); } });
lamarant
source share