How can I generate a date sequence and place each date within inputs (OS INPUTS ALREADY EXIST WITHIN A FORM) from the start date and end date automatically?
I put the start and end date, and script generates the date range on inputs that already exist. It is not possible to generate the input's. And yes put the dates generated within them. A input
for each date.
SCRIPT TEST GENERATING DATE INTERVAL
var dt= new Date();
var ndt = new Date(1850,01,27);
var diassem = ndt.getDay();
var mes=ndt.getMonth();
var meses = new Array("Janeiro","Fevereiro","março");
var dias = new Array("Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sabado");
for (var i = 0; i <= 10; i++)
{
var dia=ndt.getDate()+i;
document.write(dia+"________");
*****AQUI EU CONSIGO IMPRIMIR, MAS N CONSIGO PEGAR CADA DATA GERADA E COLOCAR NOS INPUTS DE ACORDO COM O ID DE CADA UM ( dti0, dti1, dti2....)****
};
TEST FORM WHERE I WILL SEND SAVE NO DATABASE
<form method="POST" action="teste.php">
<input type="text" name="dti0" id="dti0" autocomplete="off"/><br>
<input type="text" name="dti1" id="dti1" autocomplete="off"/><br>
<input type="text" name="dti2" id="dti2" autocomplete="off"/><br>
<input type="text" name="dti3" id="dti3" autocomplete="off"/><br>
</form>
I kind of sketch my code. In it I can generate the sequence of dates, but I still do not know how to put each date within a input