jquery - Add One Month to a Date in JavaScript -


I have an input field that should be increased by one month using the JavaScript date object. I have made an attempt to increase the month below. It seems that it will display 0 in the form of January and will not increase in the year.

  nDate.setDate (nDate.getDate ()); Inputbox1.value = (nDate.getMonth () + 1) + "/" + (nDate.getDate ()) + "/" + (nDate.getFullYear ());  

  // assumed document.form1.textbox1.value a personal Date is var d = new date (document.form1.textbox1.value); D.setMonth (d.getMonth () + 1); Document.form1.textbox1.value = (d.getMonth () + 1) + '/' + d.getDate () + '/' + d.getFullYear ();  

Set the month considered to be the proof of range, as described.


Comments