Better positioning for Calendar

pull/1751/head
Cagatay Civici 2021-11-11 18:03:32 +03:00
parent bcf326e0d9
commit ac4aa0ac68
1 changed files with 8 additions and 5 deletions

View File

@ -658,10 +658,6 @@ export default {
},
switchToMonthView(event) {
this.currentView = 'month';
setTimeout(() => {
this.alignOverlay();
}, 1000);
event.preventDefault();
},
switchToYearView(event) {
@ -752,7 +748,14 @@ export default {
DomHandler.relativePosition(this.overlay, this.$el);
}
else {
this.overlay.style.minWidth = DomHandler.getOuterWidth(this.$el) + 'px';
if (this.view === 'date') {
this.overlay.style.width = DomHandler.getOuterWidth(this.overlay) + 'px';
this.overlay.style.minWidth = DomHandler.getOuterWidth(this.$el) + 'px';
}
else {
this.overlay.style.width = DomHandler.getOuterWidth(this.$el) + 'px';
}
DomHandler.absolutePosition(this.overlay, this.$el);
}
}