Here we have some javascript that handles the population of the combo boxes involved in selecting a date. The reason I made this script is to prevent users from selecting days that are not in a given month. It determines how many days are in a month for the given year. Leap year is accounted for. In this example, I choose to limit the year selection between the current year and 100 years back.