What platform does this relate to? Most platforms (iOS and later Android) have native support for the HTML5 input types "date", "time" and "datetime".
e.g. <input type="date">
If you're targeting a platform that does not have native support, there are Cordova/PhoneGap plugins available to achieve this: http://plugreg.com/search?q=date+time