-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.js
More file actions
21 lines (18 loc) · 903 Bytes
/
Copy pathdashboard.js
File metadata and controls
21 lines (18 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
document.addEventListener('DOMContentLoaded', function() {
updateClockAndDate();
setInterval(updateClockAndDate, 1000);
const taskListElement = document.getElementById('taskList');
displayTasks(taskListElement);
document.getElementById('logo').addEventListener('click', function() {
const taskContainer = document.getElementById('taskContainer');
taskContainer.style.display = taskContainer.style.display === 'none' ? 'block' : 'none';
});
document.getElementById('addTaskButton').addEventListener('click', function() {
const taskInput = document.getElementById('taskInput').value;
const taskTime = document.getElementById('taskTime').value;
const taskPriority = document.getElementById('prioritySelect').value;
addTask(taskInput, taskTime, taskPriority, function() {
displayTasks(taskListElement);
});
});
});