JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="weeks"></input>
<br/>
<input type="text" id="from"></input>
<br/>
<p id="to"></p>
<br/>
<div id="calc">CALC!</div>

JavaScript

var today = new Date();
$('#from').val(today);
$('#calc').click(function() {
    var weeks = $('#weeks').val();
    var datefrom = new Date($('#from').val());
    var dateto = new Date();
    dateto.setDate(datefrom.getDate()+weeks*7);
    $('#to').text(dateto);
});