Skip to content

Commit dac6449

Browse files
committed
data
1 parent e7581cd commit dac6449

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

css/style.css

+4
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,8 @@ h2 {
165165
.editar-atividade > form {
166166
flex-direction: column;
167167
}
168+
169+
input[type="date"]{
170+
width: 100%;
171+
}
168172
}

js/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ function construirFormularioNovo(){
1919
inputDataAtividade.type = 'date';
2020
inputDataAtividade.required = true;
2121
inputDataAtividade.placeholder = "Informe a data";
22+
23+
let dataAtual = new Date();
24+
let dataAtualFormat = dataAtual.toISOString().substr(0, 10);
25+
26+
inputDataAtividade.setAttribute("value", dataAtualFormat);
27+
inputDataAtividade.innerText = dataAtualFormat;
28+
2229
botao.textContent = 'Adicionar';
2330
botao.type = 'submit';
2431
formulario.appendChild(inputAtividade);
@@ -98,6 +105,9 @@ function main(){
98105
atualizar();
99106
inputAtividade.value = "";
100107
inputDataAtividade.value = "";
108+
let dataA = new Date();
109+
let dataAFormat = dataA.toISOString().substr(0, 10);
110+
inputDataAtividade.value = dataAFormat;
101111
selectTagsPrioridade.value = 0;
102112
});
103113
}

0 commit comments

Comments
 (0)