Help to Print the ship departure date in the text area with id scheduleDate , seperated by new line character

Problem Statement:I would like to develop a web application to generate the schedule for the ship that will be coming to the port every 15 days. Starting date of the schedule is given, generate the schedule for the corresponding year. The carrier will function only in the week days, if the schedule falls on sat or sun then it should be moved to monday.


below code i have attempted just to get UI but need help to generate scheduler as per problem statement
``

Carrier Schedule Generator

<table>
<tr>
	<td>Start date (MM/dd/yyyy)</td>
	<td>
		<input type="date" name="date" id="date">
		<button type= "button" id="generate" onclick="myFunction()">Generate</button>
	</td>
</tr>	

<tr>	
	<td>Carrier schedule for the corresponding year
	    (dd/MM/yyyy)</td>
	<td>	<input type="textbox" rows="10" cols="10" id="scheduleDate" ></td>
</tr>	

<tr>
	<td>
		<div id="result" name="result"></div>
	</td>
</tr>
</table>
``

thats is why i have shared the screenshot, looks like you didnt looked into it, also shared problem statement, when user picks the date then while clicking on generate button it should display dates beyond 15 days and take the dates which are excluding Sat and Sun
Below is the snippet, logic is still incomplete, thats why i need help

<body>
<center>
    <h2>Carrier Schedule Generator</h2>
    
	<table>
	<tr>
		<td>Start date (MM/dd/yyyy)</td>
		<td>
			<input type="date" name="date" id="date">
			<button type= "button" id="generate" onclick="myFunction()">Generate</button>
		</td>
	</tr>	
	
	<tr>	
		<td>Carrier schedule for the corresponding year
		    (dd/MM/yyyy)</td>
		<td>	<input type="textbox" rows="10" cols="10" id="scheduleDate" ></td>
	</tr>	
	
	<tr>
		<td>
			<div id="result" name="result"></div>
		</td>
	</tr>
	</table>
    
</center>

<script>
	function myFunction(){
		var str= document.getElementById("date").value;
		var dt= new Date(str);
		var month = dt.getMonth();  
		var day = dt.getDate()+15;  
		var year = dt.getFullYear();  
		console.log(day + '/' + day + '/' + year);  
		//console.log(dt);
		
	
	}
	
</script>
 
	
</body>
</html>

already provided the explanation but still no help :frowning: