Get the plugin: Date Select Boxes
A simple way to implement smart date select boxes. Given month, day, and year select boxes, this plugin will automatically populate the day select box with the proper amount of days for a given year and month combination, taking leap years into account. Includes and uses jQuery Select Box Manipulation plugin.
Usage: $().dateSelectBoxes($(‘#birthMonth’),$(‘#birthDay’),$(‘#birthYear’), keepDayLabel);
Where keepDayLabel is a boolean to say whether or not you want to preserve the first element in the select (e.g., a value-less, descriptive option used as a label (e.g., ‘day’))