diff --git a/public/index.html b/public/index.html
index b72ad89..2e85aec 100644
--- a/public/index.html
+++ b/public/index.html
@@ -485,7 +485,7 @@ function dayClick(dk) {
if (!isSelecting) {
selectionStart = dk;
isSelecting = true;
- document.getElementById('sel-hint').textContent = '📍 Kattints a befejező dátumra';
+ document.getElementById('sel-hint').textContent = '📍 Kattints a befejező dátumra (ESC = mégse)';
highlightSelection(dk, dk);
} else {
const start = selectionStart < dk ? selectionStart : dk;
@@ -613,6 +613,16 @@ function escapeHtml(t) {
return d.innerHTML;
}
+// Cancel selection with ESC
+document.addEventListener('keydown', function(e) {
+ if (e.key === 'Escape' && isSelecting) {
+ isSelecting = false;
+ selectionStart = null;
+ document.getElementById('sel-hint').textContent = 'Kattints a kezdő dátumra a naptárban ↓';
+ document.querySelectorAll('.cal-day').forEach(el => el.classList.remove('in-selection'));
+ }
+});
+
// Start
checkAuth();