Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

use month from current date as default for select list

I have this ddl fiddle

http://jsfiddle.net/L5z6e2ga/

In the select list i'm defaulting to october on page load llike this:  
<option selected="selected" value="10/01/2016">October</option>

Instead of hard coding it like this. How do I use date function and look up today's month and use that month to then set the selected month on the input select.

So if I launch this fiddle this month (which is October) it will default to October, but if I launch it next month. I will launch with November by default.
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

thanks.