Why are you not using the HTML5 date picker for this and letting the polyfill do it's thing? Just from looking over your shoulder, they were not very different.