Fix hover empty cal cells
This commit is contained in:
parent
bc5a8e0305
commit
12c5698f57
BIN
db/freesched.db
BIN
db/freesched.db
Binary file not shown.
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user