2
I’d like to limit the selection of input date this way, but it’s not working.
<script type="text/javascript">
var data = new Date();
var dia = data.getDate();
var mes = data.getMonth();
var ano4 = data.getFullYear();
var str_data = ano4 + '-' + (mes+1) + '-' + dia;
<?php $data=str_data;?>
</script>
<input type="date" name="data" max="<?=$data?>"/>
I don’t understand, explain to us what you want to display and limit exactly?
– Caique Romero
You want to take the Javascript variable
str_data
and play within PHP? This is not possible.– Sam
That’s right Lucas Costa
– Emanuel De Oliveira Peres