Try writing some of your own, and see how it goes. Universal time (UTC) is documented at the bottom of this page. If you use min and max to restrict the available dates (see Setting maximum and minimum dates), supporting browsers will display an error if you try to submit a date that is out of bounds. Practice. The months are hardcoded (as they are always the same), while the day and year values are dynamically generated depending on the currently selected month and year, and the current year (see the code comments below for detailed explanations of how these functions work.). new Date() returns a date object with the current date and time. Markup Validation Service. The other part of the code that may be of interest is the feature detection code to detect whether the browser supports . If not, it is considered invalid. If isn't supported, we hide the native picker and show the fallback (