fix calendar positionning

When an element is not yet drawn at DOMready the offset of the element is not set yet. This patch moves the offset definition on click rather than on page load.