Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery add month to selected date

We have 1 Month, 3 Month, 6 Month, 9 Months, 1 Year Membership in dropdown list

What we where trying to do is if user select 25/06/2012 for start of membership of 9 months, we want to show him when his membership will expire like say 25/03/2013. we tried many things but it give some wrong date.

we are using jquery-ui for selection of start membership date

Regards Arshad

like image 495
Moksha Avatar asked Feb 21 '12 15:02

Moksha


People also ask

How to add 1 Month to JavaScript date?

To add months to a JavaScript Date, use the setMonth() method. JavaScript date setMonth() method sets the months for a specified date according to local time.


1 Answers

I like date.js, it's a little date library that's handy for this type of thing.

like image 68
Diodeus - James MacFarlane Avatar answered Sep 28 '22 20:09

Diodeus - James MacFarlane