I have a problem when validating dates using JavaScript. I have the following form:
<tr>
<td>
<input type="date" name="fecha1" value="<?php echo date($fecha1);?>">
</td>
</tr>
<tr>
<td>
<input type="date" name="fecha2" value="<?php echo date($fecha2);?>">
</td>
</tr>
<tr>
<td>
<input type="date" name="fecha3" value="<?php echo date($fecha3);?>">
</td>
</tr>
<tr>
<td>
<input type="date" name="fecha4" value="<?php echo date($fecha4);?>">
</td>
</tr>
Where I place 4 dates.
If the database has said date, the sample, but nothing shows.
My question is: When filling out the form with the dates, how can I validate that no dates are placed before the ones already loaded, that is, for example:
Si fecha1 = x fecha
fecha2 no debe ser menor a fecha1
fecha3 no debe ser menor a fecha2
fecha4 no debe ser menor a fecha3
Is it possible?