mobilebadboy
09-09-2009, 05:11 PM
I've been trying to wrap my head around this for a long time now. In my head I know the theory of what needs to be done but every time I sit and try to type out the code, my mind goes blank.
I have a form with a Month/Year format (combined) and the first date is always the current month/year followed by 17 future months + incremented year when needed, ie:
<option value="9/1/2009">September 2009</option>
<option value="10/1/2009">October 2009</option>
<option value="11/1/2009">November 2009</option>
..... .....
<option value="12/1/2010">December 2010</option>
<option value="1/1/2011">January 2011</option>
<option value="2/1/2011">February 2011</option>
Currently this is updated manually and I often forget to do it, which is why I'd like to finally get this straight and forget it. The year rollover part, 09 > 10 > 11, etc, is one of my major hangups (another thing I can imagine in my head, but not get in to code).
I've searched and searched, everything that I have found is separated in to multiple select menus.
I have a form with a Month/Year format (combined) and the first date is always the current month/year followed by 17 future months + incremented year when needed, ie:
<option value="9/1/2009">September 2009</option>
<option value="10/1/2009">October 2009</option>
<option value="11/1/2009">November 2009</option>
..... .....
<option value="12/1/2010">December 2010</option>
<option value="1/1/2011">January 2011</option>
<option value="2/1/2011">February 2011</option>
Currently this is updated manually and I often forget to do it, which is why I'd like to finally get this straight and forget it. The year rollover part, 09 > 10 > 11, etc, is one of my major hangups (another thing I can imagine in my head, but not get in to code).
I've searched and searched, everything that I have found is separated in to multiple select menus.