what is the date after 30days from current date using javascript -


how can find date 30 days after current day? here 30 fixed value. how can pass dynamic value function..

days = document.getelementbyid('day').value; var d = new date(); d.setdate(d.getdate() + days); 

it not working..it gives wrong answer

you can access time in javascript using date class. try this:

var time = new date(); time.setdate(time.getdate()+30); alert(time); 

edit added test jsfiddle here in case wants test it.

sorry forgot adding!!!


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

c++ - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? -

c# - Asterisk click to call -