-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (60 loc) · 2.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Aplicativo To-Do</h1>
<div class="input-container">
<div class="input-group">
<label for="new-task">Tarefas</label>
<input type="text" id="new-task" placeholder="Digite a nova tarefa...">
</div>
<div class="input-group">
<label for="task-end-date">Data Final</label>
<input type="date" id="task-end-date">
</div>
<button id="add-task">Adicionar</button>
</div>
<table id="task-table">
<thead>
<tr>
<th>Selecionar</th>
<th>Tarefa</th>
<th>Data Final</th>
<th>Data de Inserção</th>
<th>Hora</th>
</tr>
</thead>
<tbody>
<!-- As tarefas serão inseridas aqui -->
</tbody>
</table>
<div class="actions-container">
<button id="complete-selected" class="action-btn">Concluir Tarefa</button>
<button id="delete-selected" class="action-btn">Excluir Tarefa</button>
</div>
<footer>
<label for="data">Data:</label>
<input type="date" id="data" name="data">
<label for="horario">Horário:</label>
<input type="time" id="horario" name="horario">
</footer>
<script src="script.js"></script>
<script>
function atualizarDataEHora() {
const hoje = new Date();
const dataFormatada = hoje.toISOString().split('T')[0];
document.getElementById('data').value = dataFormatada;
const horas = String(hoje.getHours()).padStart(2, '0');
const minutos = String(hoje.getMinutes()).padStart(2, '0');
const horarioFormatado = `${horas}:${minutos}`;
document.getElementById('horario').value = horarioFormatado;
}
setInterval(atualizarDataEHora, 1000);
</script>
</body>
</html>