JSFiddle - React, Tailwind, and code Playground

HTML

<div id="aslaEmbeddedSearch" style="width:355px; height:50px">
    <div style="float:right; width:230px">
        <button id="addDays">Add days</button>
     </div>
        <div style="float:left;width:195px;">
            From : <input type="text" id="start-date" value='2011-11-11'/><br>
            Nights : <select id="nights" >
            <option>10</option>
            <option>20</option>
            </select>
       </div>
</div>

JavaScript

$("#addDays").click(function(){
    var startDate = new Date($("#start-date").val());
    var endDate = new Date($("#start-date").val());
    endDate.setDate( endDate.getDate() + parseInt( $("#nights").val() ) ); 
    alert(endDate.getFullYear() + "-" + endDate.getMonth() +"-"+ endDate.getDate());         
    

})