Answers for "get date and change format and increase date or month in javascript jquery"

0

get date and change format and increase date or month in javascript jquery

month = Number($("#con_months_of_contract").val());

var date = $('#datepicker2').val();
var newdate = date.split("-").reverse().join("-");
var myDate = new Date(newdate);
// select month one change
var newDate2 = new Date(myDate.setMonth(myDate.getMonth()+month));
//renewal date is -1 
newDate2.setDate(newDate2.getDate()-1);
$("#datepicker4").datepicker("setDate", newDate2);

//@sujay
Posted by: Guest on October-14-2020

Code answers related to "get date and change format and increase date or month in javascript jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language