JSFiddle - React, Tailwind, and code Playground
by cneeds
HTML
<table>
<tr><td valign="bottom">
<span class="textColor">Policy dates</span>
</td><td>
<label for="Inception">Inception</label>
<input id="Inception" class="datepicker" name="Inception" title="Select the policy's inception date" tabindex="1" type="text" readonly="readonly" autocomplete="off" placeholder="Inception" maxlength="10">
</td>
<td>
<label for="NextRenewal">Next renewal</label>
<input id="NextRenewal" class="datepicker" name="NextRenewal" title="Select the policy's next renewal date" tabindex="2" type="text" readonly="readonly" autocomplete="off" placeholder="Renewal" maxlength="10">
</td></td>
</tr>
</table>
JavaScript
$(document).ready(function() {
$(document).on('blur', '#Inception', function (evnt) {
//alert('datepick increment renewal');
var inceptionDate = $(this).datepicker("getDate");
$('#RenewalDate').datepicker("setDate", new Date(inceptionDate.getFullYear()+1, inceptionDate.getMonth(), inceptionDate.getDate()));
});
});