diff --git a/calendar/assets/PAGE-calendar.css b/calendar/assets/PAGE-calendar.css index 3eed3e73..f3d66e0e 100644 --- a/calendar/assets/PAGE-calendar.css +++ b/calendar/assets/PAGE-calendar.css @@ -57,6 +57,10 @@ color: #b5b5b5; padding: 5px; } +.calRowHead .calCellDay:hover { + color: #ff5b5b; + cursor: pointer; +} .calRowBack .calCell { border: 1px solid #eee; } .calBlank { background: #f5f5f5; } .calToday { background: #feffd3; } diff --git a/calendar/assets/PAGE-calendar.js b/calendar/assets/PAGE-calendar.js index d0f8e8da..89812257 100644 --- a/calendar/assets/PAGE-calendar.js +++ b/calendar/assets/PAGE-calendar.js @@ -112,7 +112,17 @@ var cal = { celler = day => { cell = document.createElement("div"); cell.className = "calCell"; - if (day) { cell.innerHTML = day; } + if (day) { + cell.innerHTML = day; + cell.classList.add("calCellDay"); + cell.onclick = () => { + cal.show(); + let d = +day, m = +cal.hMth.value, + s = `${cal.hYear.value}-${String(m<10 ? "0"+m : m)}-${String(d<10 ? "0"+d : d)}T00:00:00`; + cal.hfStart.value = s; + cal.hfEnd.value = s; + }; + } rowB.appendChild(cell); cell = document.createElement("div"); cell.className = "calCell"; diff --git a/calendar/pages/PAGE-calendar.php b/calendar/pages/PAGE-calendar.php index 0ad2869c..f4f2d59b 100644 --- a/calendar/pages/PAGE-calendar.php +++ b/calendar/pages/PAGE-calendar.php @@ -65,7 +65,7 @@