0

I have 3 drop downs. The first is for year, second is for month, and the last is for days. Now I want to know when I click the 2015 year and month February the third dropdown should display a days up to 29 days. Now my question is there a function in javascript to check the months if it's 29, 30, 31. Is there any example out there?

my current code is below but I generate it using php:

<div class="select_day">
     <select id="year" name="year">
         <option value=""> -- </option>
         {for $i = 1970; $i <= 2015; $i++}
             <option value=$i >{$i}</option>
         {/for}
     </select>

    <select id="month" name="month">
        <option value=""> -- </option>
        {for $i = 1; $i <= 12; $i++ }
            <option value=$i >{$i}</option>
        {/for}
    </select>
</div>
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
QWERTY
  • 263
  • 2
  • 6
  • 21

0 Answers0