javascript - how to copy the value from one date box to next box -
how copy value 1 date box next box
<?php $dat=date("y-m-d");?> <td><input type="date" value=<?php echo $dat;?> name="from" onchange=fun1();/></td> <td class=to>to:<input type="date" value= name="to"></td>
like below:
$('input[name=to]').val($('input[name=from]').val());
or if want copy value form from
to
when from
changed:
$('input[name=from]').change(function() { $('input[name=to]').val($(this).val()); });
Comments
Post a Comment