JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="txt1" value="" />
<input type="button" value="click me" id="btn1" onclick="addyear()" />
JavaScript
$("#btn1").bind("click", function () {
var strDate = document.getElementById('txt1').value
var array = strDate.split('-');
var newDate = (parseInt(array[0]) + 1) + "-" + array[1] + "-" + array[2];
document.getElementById('txt1').value=newDate;
});