JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://www.datejs.com/build/date.js" type="text/javascript"></script>


<input type="checkbox" id="6months" /> +6 Months <br />
<input type="text" id="Date" />

JavaScript

$("#6months").click(function(){ 
  if ($("#6months").is(":checked"))
  {
      var newDate = Date.today().addMonths(6).toString('yyyy-MM-dd');
      $('#Date').val(newDate);
  }
});