Here is my solution to the problem:
$(window).on('resize orientationchange', function (e) {
if ($.datepicker._datepickerShowing) {
var datepicker = $.datepicker._curInst;
dpInput = datepicker.input;
dpElem = datepicker.dpDiv;
dpElem.position({
my: 'left top',
of: dpInput,
at: 'left bottom'
});
}
});