Fix hover empty cal cells

This commit is contained in:
Doug Masiero 2025-02-25 00:36:59 -05:00
parent bc5a8e0305
commit 12c5698f57
3 changed files with 28 additions and 2 deletions

Binary file not shown.

View File

@ -64,7 +64,9 @@ async function renderAdminCalendar(month, year) {
// Create blank cells for days before the first day of the month
for (let i = 0; i < firstDay; i++) {
const blank = document.createElement('div');
blank.classList.add('date-item', 'p-2', 'rounded-pill', 'text-center', 'text-muted');
blank.classList.add('date-item', 'p-2', 'rounded-pill', 'text-center', 'text-muted', 'empty-cell');
blank.style.cursor = 'default'; // Remove pointer cursor
blank.style.pointerEvents = 'none'; // Disable hover and click events
adminCalendarDates.appendChild(blank);
}
@ -828,6 +830,17 @@ document.addEventListener('DOMContentLoaded', async () => {
font-weight: bold !important;
}
/* Prevent hover effects on empty calendar cells */
.date-item.empty-cell {
cursor: default !important;
pointer-events: none !important;
}
.date-item.empty-cell:hover {
background-color: transparent !important;
transform: none !important;
}
/* Time picker styling */
#visualTimePicker {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;

View File

@ -43,6 +43,17 @@ document.addEventListener('DOMContentLoaded', async () => {
color: white !important; /* White text for better contrast */
font-weight: bold !important;
}
/* Prevent hover effects on empty calendar cells */
.date-item.empty-cell {
cursor: default !important;
pointer-events: none !important;
}
.date-item.empty-cell:hover {
background-color: transparent !important;
transform: none !important;
}
`;
document.head.appendChild(style);
@ -119,7 +130,9 @@ document.addEventListener('DOMContentLoaded', async () => {
// Create blank cells for days before the first day of the month
for (let i = 0; i < firstDay; i++) {
const blank = document.createElement('div');
blank.classList.add('date-item', 'p-2', 'rounded-pill', 'text-center', 'text-muted');
blank.classList.add('date-item', 'p-2', 'rounded-pill', 'text-center', 'text-muted', 'empty-cell');
blank.style.cursor = 'default'; // Remove pointer cursor
blank.style.pointerEvents = 'none'; // Disable hover and click events
calendarDates.appendChild(blank);
}