Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Input Type="date" doesn't work in IE

Tags:

html

browser

Why does the type="date" work in Chrome but not IE:

<input name="start_date" type="date" value="<?php echo $today;?>" autocomplete="off" required="required">

If you need more information let me know. Thanks!

like image 953
ncurran217 Avatar asked Dec 19 '12 14:12

ncurran217


2 Answers

input type='date' is an HTML 5 feature. As such, it is not implemented by all browsers yet, and will not be supported by older browsers like IE 7 and 8.

http://caniuse.com/#search=date

You should use a polyfill with javascript to handle these cases and provide a consistent user experience on browsers that dont support HTML5.

like image 118
Thomas Jones Avatar answered Sep 26 '22 11:09

Thomas Jones


You can test, which elements of new HTML5 standard are supported by which browser by just opening site like http://html5test.com/ in your browser

like image 37
DKSan Avatar answered Sep 22 '22 11:09

DKSan