Here is the code in question:
var theDate = new Date();
for (monthCounter = 0; monthCounter < 12; monthCounter++)
theMonth = theDate.toString();
theMonth = theMonth.substr(4, 3);
document.write("<option value=" + theMonth + ">" + theMonth);
Thank you in advance for the help.
Your new Date() is probably December 31-
if you change only the month to February you are getting February 31, which is resolved to March 3 (it would be March 2 in 2012).
Set the starting date to the 1rst of the month, instead of whatever todays date may be.
var theDate = new Date(2011,0,1); //january 1,2011
It would actually need to be either 29th or 30th to get that result.
31st would give:
Jan Mar Mar May May Jul Jul Aug Oct Oct Dec Dec