Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 datetime-local input field vs jQueryui datetime picker

So I just found out that you can get the datetime picker functionality that jQuery libraries offer by just using an input field with type datetime-local.

I haven't seen much info about it on the net. Are there reasons not to use it? Is it supported across all browsers?

like image 862
Eliezer Steinbock Avatar asked Aug 31 '25 10:08

Eliezer Steinbock


1 Answers

As @Musa said, the UI for input[type=date] is different across operating systems and even browsers (some modern browsers don't even support it). Hopefully the input type will be more widely supported, however there will likely not be support for older browsers/versions.

If you want to use the cool input[type=date] syntax, don't fret! There are Javascript polyfills that provide this functionality for you when the browser doesn't!

As HTML5Please suggests, use input[type=date] with caution and make sure you have a polyfill such as Webshims or HTML5Widgets.

like image 170
Michael Tang Avatar answered Sep 03 '25 01:09

Michael Tang