i'm making a code where when i selected a start date,an end date will automatically appear. the end date is +3 days of the start date
<input type="date" name="start_date" id="start" onKeyUp="date()">
<input type="text" name="end_date" id = "end" onKeyUp="date()" disabled />
<script type = "text/javascript">
function date() {
var startdate = document.getElementById('start');
var enddate = document.getElementById('end');
enddate.value = startdate + 3 days;
}
</script>
this enddate.value = startdate + 3 days; i know that code is wrong. i dont know how to pass dates to javascript. please help