Jquery For Add Month(integer number) with Date
Hai sir , i want to add to add an integer number to dates. Like the number consider as number of month like (3,6,9,12) . if now date is 31/01/2014 add the number 6 means i want to after 6 months which date comes..can you please help me sir
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Abhay ShankerRank #375 · 6.7K reputationPosted Jan 30, 2014, 6:59 PM EST
function duedatecal(){
var invoicedate = new Date(Date.parse(jQuery(".invoicedate").val()));
invoicedate.setDate(invoicedate.getDate() + parseInt(jQuery(".paymentterms").text()));
jQuery(".duedate").html((invoicedate.getMonth()+1) + '/' +invoicedate.getDate() + '/' + invoicedate.getFullYear());
}
Ajith kp132 reputationPosted Jan 30, 2014, 7:19 PM EST
var currentMonth = currentDate.setMonth(currentDate.getMonth + 6);
this is my code.. your code is not working..