add 1 year to current date javascript

Solutions on MaxInterview for add 1 year to current date javascript by the best coders in the world

showing results for - "add 1 year to current date javascript"
Alex
28 Oct 2016
1// [SOLVED]  var date  = new Date(year + 1, month, day);
2
3$('#membership_start').on('dp.change', function(e){
4   console.log(e.date);
5
6   var year  = new Date(e.date).getFullYear();
7   var month = new Date(e.date).getMonth();
8   var day   = new Date(e.date).getDate();
9   var date  = new Date(year + 1, month, day);
10   $('#membership_end').data("DateTimePicker").date(date);
11 });