Skip to content

Commit

Permalink
Release 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uvarov-frontend committed Oct 12, 2023
1 parent bf15134 commit f3d04a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package/build/vanilla-calendar.min.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package/build/vanilla-calendar.min.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,9 +1460,13 @@ const clickCalendar = (self) => {
};
let currentSelf = null;
const setPositionCalendar = (input, calendar) => {
const inputInfo = input.getBoundingClientRect();
calendar.style.left = `${inputInfo.left}px`;
calendar.style.top = `${inputInfo.top + inputInfo.height}px`;
let top = input.offsetHeight;
let left = 0;
for (let el = input; el; el = el.offsetParent) {
top += el.offsetTop || 0;
left += el.offsetLeft || 0;
}
Object.assign(calendar.style, { left: `${left}px`, top: `${top}px` });
};
const createCalendarToInput = (self) => {
if (!self.HTMLInputElement)
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uvarov.frontend/vanilla-calendar",
"version": "2.6.9",
"version": "2.7.0",
"description": "VanillaCalendar is a pure JavaScript date and time picker that uses TypeScript so it supports any JS framework and library.",
"homepage": "https://vanilla-calendar.com",
"keywords": [
Expand Down

0 comments on commit f3d04a2

Please sign in to comment.