JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://uspex.bg/assets/js/date.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
Period: <select name="periodId" id="periodId" class="change">
    <option data-id="0">-</option>
    <option value="d003" data-id="3 d">3 days</option>
    <option value="d007" data-id="7 d">7 days</option>
    <option value="m001" data-id="1 m">1 months</option>
    <option value="m002" data-id="2 m">2 months</option>
    <option value="m003" data-id="3 m">3 months</option>
</select>
From: <input type="text" name="comencingDate" id="comencingDate" class="change" value="2016-03-14">
To: <input type="text" name="expiringDate" id="expiringDate" value="2015-12-14" disabled="disabled">

JavaScript

$('.change').on('click', function() {
			var durationMonth = $('#periodId').find(':selected').data('id');      
			var startDate = $('#comencingDate').val();
      var monthDiff = Date.parse(startDate).getMonth() - new Date().getMonth()
       + (12 * (Date.parse(startDate).getFullYear() - new Date().getFullYear())); 
       
      var calcDate = Date.parse(Date.parse(startDate).toString("dd") + ' + ' + durationMonth).toString("yyyy-MM-dd");  
               
      if(monthDiff > 0)
      {
         var n_calcDate = new Date(calcDate);
         n_calcDate.setMonth(n_calcDate.getMonth() + monthDiff);
         n_calcDate.setDate(n_calcDate.getDate() + 1);
         calcDate = n_calcDate.toString("yyyy-MM-dd");
      }
      
			$('#expiringDate').val(calcDate);
});