If you put picker in element which is positioned arbitrarily on the screen it get's offset of parent and misplaces calendar relative to input + offset of the input.
I tried to fix it and succeeded by changing following line in your code:
$picker.parent().css("left", $input.offset().left + "px");
If you put picker in element which is positioned arbitrarily on the screen it get's offset of parent and misplaces calendar relative to input + offset of the input.
I tried to fix it and succeeded by changing following line in your code: $picker.parent().css("left", $input.offset().left + "px");
to
$picker.parent().css("left", $input.position().left + "px");
with this it appears right beneath the element no matter where it is located on the screen.