How to create Date Picker in HTML 5

Well, you're asking a bit of a loaded question here. On one hand, HTML5 date picker implementation is really easy:

<input type="date" name="user_date" />

But, most browsers have no idea how to interpret that (they essentially treat it like text). If you happen to be viewing an input of type="date" in a browser that supports it nicely (say, Opera 9), then you'll get a nice date picker. For every other browser, you'll get nothing but a text input.

Some good info on HTML5 Forms browser support: http://www.findmebyip.com/litmus

Assuming you want to also older browsers to support this field type, you'll need to figure out a good way to do so. I've not done it personally, but using jQuery's date picker may be a good start.

Someone has described what seems to be a decent way to implement this cross browser here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.