Fix calculation when calendar outside viewport
Merge branch 'vanilla'