Notice how when the month or year are changed, the number of days automatically update correctly to 28, 29, 30, or 31.
Actually, the feature that took the most work is the least noticed one: the button with the question mark (?) brings up a monthly calendar that can be used to select a date in a very user-friendly manner.
Since this is javascript, you can simply view the source from within your browser to see the code. Thanks for visiting.