How do i make AllDaySlot not overlap my popup? How do i make AllDaySlot not overlap my popup?
i made a div popup that appears when you want to make an event. The popup works great on the "Month" view of fullcalendar,but on the "Week" and "Day" view,the allDaySlot overlap the div and make it impossible to click on the "X" span I don't know why it's only the AllDaySlot that have a problem with that since everything else works Any idea? Here is the most important part of the code of my div popup(sorry if the code can be not very optimized,i'm still learning)
<div id="popupjs" class="popup">
<div class="contenu-popup" id="contenupopup">
<span class="close">×</span>
...a lot of content...
</div>
</div>
.popup {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.contenu-popup {
background-color: white;
margin: 10% auto;
height: 60%;
border: 1px solid #888;
border-radius: 10px;
width: 30%;
overflow: auto;
}
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
select: function(info) {
...i removed some codes so you can focus on the essentials...
var popup = document.getElementById("popupjs");
var contenupopup = document.getElementById("contenupopup");
var span = document.getElementsByClassName("close")[1];
var body = document.getElementById("body");
if (calendar.view.type === "dayGridMonth") {
var allDays = true;
} else
{
var allDays = false;
}
popup.style.display = "block";
contenupopup.style.height = "34%";
body.style.overflow = "hidden";
calendar.unselect();
span.onclick = function() {
popup.style.display = "none";
body.style.overflow = "auto";
}
Thanks.
from Stackoverflow
Comments
Post a Comment