Eisenhower Matrix

Prioritize tasks using the Eisenhower Matrix method

Home Eisenhower Matrix
Prioritize tasks using the Eisenhower Matrix method

How to Use

Add tasks and assign them to the appropriate quadrant. Drag and drop tasks between quadrants to re-prioritize. Export your matrix when done.

Urgent & Important 0

DO FIRST

Critical tasks that require immediate attention

Not Urgent & Important 0

SCHEDULE

Important long-term goals and planning

Urgent & Not Important 0

DELEGATE

Tasks that can be delegated to others

Not Urgent & Not Important 0

ELIMINATE

Distractions and time wasters to eliminate

`; printWindow.document.write(html); printWindow.document.close(); } // Save Matrix Dialog function saveMatrixDialog() { const totalTasks = Object.values(tasks).reduce((sum, q) => sum + q.length, 0); if (totalTasks === 0) { alert('Please add some tasks to the matrix before saving.'); return; } const name = prompt('Enter a name for this matrix:', `Matrix ${new Date().toLocaleDateString()}`); if (!name) return; try { const savedMatrices = JSON.parse(localStorage.getItem('eisenhower-saved-matrices') || '[]'); const matrix = { id: Date.now(), name: name.trim(), tasks: JSON.parse(JSON.stringify(tasks)), taskIdCounter: taskIdCounter, savedAt: new Date().toISOString(), taskCount: totalTasks }; savedMatrices.unshift(matrix); // Keep only last 20 matrices if (savedMatrices.length > 20) { savedMatrices.length = 20; } localStorage.setItem('eisenhower-saved-matrices', JSON.stringify(savedMatrices)); showToast(`Matrix "${name}" saved successfully!`, 'success'); // Auto-show saved matrices showSavedMatricesModal(); } catch (e) { console.error('Failed to save matrix:', e); if (e.name === 'QuotaExceededError') { alert('Storage quota exceeded. Please delete some old saved matrices first.'); } else { alert('Failed to save matrix. Please try again.'); } } } // Show Saved Matrices Modal function showSavedMatricesModal() { const modal = document.getElementById('savedMatricesModal'); const list = document.getElementById('saved-matrices-list'); let savedMatrices = []; try { savedMatrices = JSON.parse(localStorage.getItem('eisenhower-saved-matrices') || '[]'); } catch (e) { console.error('Failed to load saved matrices:', e); savedMatrices = []; } if (savedMatrices.length === 0) { list.innerHTML = `

No saved matrices yet.

Create a matrix and click "Save Matrix" to save it.

`; } else { list.innerHTML = `
${savedMatrices.map(matrix => `

${escapeHtml(matrix.name)}

Saved: ${new Date(matrix.savedAt).toLocaleString()}

Total tasks: ${matrix.taskCount}

`).join('')}
`; } modal.style.display = 'flex'; } function closeSavedMatricesModal() { document.getElementById('savedMatricesModal').style.display = 'none'; } // Load Saved Matrix function loadSavedMatrix(matrixId) { try { const savedMatrices = JSON.parse(localStorage.getItem('eisenhower-saved-matrices') || '[]'); const matrix = savedMatrices.find(m => m.id === matrixId); if (!matrix) { alert('Matrix not found.'); return; } if (!confirm(`Load "${matrix.name}"? This will replace your current matrix.`)) { return; } tasks = JSON.parse(JSON.stringify(matrix.tasks)); taskIdCounter = matrix.taskIdCounter || 0; saveTasks(); renderAllQuadrants(); closeSavedMatricesModal(); showToast(`Matrix "${matrix.name}" loaded successfully!`, 'success'); } catch (e) { console.error('Failed to load matrix:', e); showToast('Failed to load matrix. The data may be corrupted.', 'error'); } } // Delete Saved Matrix function deleteSavedMatrix(matrixId) { if (!confirm('Are you sure you want to delete this saved matrix?')) { return; } try { let savedMatrices = JSON.parse(localStorage.getItem('eisenhower-saved-matrices') || '[]'); savedMatrices = savedMatrices.filter(m => m.id !== matrixId); localStorage.setItem('eisenhower-saved-matrices', JSON.stringify(savedMatrices)); showSavedMatricesModal(); // Refresh the list } catch (e) { console.error('Failed to delete matrix:', e); alert('Failed to delete matrix. Please try again.'); } } // Close modals when clicking outside document.addEventListener('click', function(e) { if (e.target.id === 'templatesModal') { closeTemplatesModal(); } if (e.target.id === 'savedMatricesModal') { closeSavedMatricesModal(); } }); // ======================================== // KEYBOARD SHORTCUTS // ======================================== document.addEventListener('keydown', function(e) { // Check if user is typing in an input field const isInputFocused = document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA' || document.activeElement.classList.contains('edit-input'); // Ctrl+Z / Cmd+Z - Undo if ((e.ctrlKey || e.metaKey) && e.key === 'z' && !e.shiftKey) { e.preventDefault(); undo(); return; } // Ctrl+Shift+Z / Cmd+Shift+Z or Ctrl+Y / Cmd+Y - Redo if ((e.ctrlKey || e.metaKey) && (e.key === 'y' || (e.key === 'z' && e.shiftKey))) { e.preventDefault(); redo(); return; } // Ctrl+S / Cmd+S - Save Matrix if ((e.ctrlKey || e.metaKey) && e.key === 's') { e.preventDefault(); saveMatrixDialog(); return; } // Ctrl+E / Cmd+E - Export if ((e.ctrlKey || e.metaKey) && e.key === 'e') { e.preventDefault(); exportTasks(); return; } // Ctrl+F / Cmd+F - Focus Search if ((e.ctrlKey || e.metaKey) && e.key === 'f') { e.preventDefault(); document.getElementById('search-input').focus(); return; } // Ctrl+P / Cmd+P - Print (let browser handle) // No override needed // If input is focused, don't handle other shortcuts if (isInputFocused) return; // Number keys 1-4 to focus on adding task to specific quadrant if (['1', '2', '3', '4'].includes(e.key)) { e.preventDefault(); const input = document.getElementById('task-input'); input.focus(); document.getElementById('quadrant-selector').classList.remove('hidden'); showToast(`Press Enter to add task to Quadrant ${e.key}`, 'info', 2000); // Store the selected quadrant input.dataset.selectedQuadrant = e.key; return; } // Escape - Close modals or selectors if (e.key === 'Escape') { const selector = document.getElementById('quadrant-selector'); if (!selector.classList.contains('hidden')) { selector.classList.add('hidden'); } closeTemplatesModal(); closeSavedMatricesModal(); return; } // ? - Show keyboard shortcuts help if (e.key === '?') { e.preventDefault(); showKeyboardShortcuts(); return; } }); // Show keyboard shortcuts help function showKeyboardShortcuts() { const shortcuts = `

Keyboard Shortcuts

Ctrl+Z
Undo last action
Ctrl+Shift+Z or Ctrl+Y
Redo action
Ctrl+S
Save matrix
Ctrl+E
Export tasks
Ctrl+F
Search tasks
Ctrl+P
Print matrix
1-4
Quick add to quadrant
Esc
Close modals
Double-click
Edit task
?
Show this help
`; showToast(shortcuts, 'info', 10000); }
  1. 1 List Tasks: Enter all items on your To-Do list.
  2. 2 Rate Tasks: For each item, rate it for Urgency and Importance.
  3. 3 Assign Quadrant: The tool sorts the items into the four quadrants: Do, Decide, Delegate, or Delete. Prioritize your tasks now!
This website uses Cookies to ensure optimal user experience.