I'm trying to use bootstrap input type 'date' to create an input field with a date picker but while the formatting for the input field appears to have been set by bootstrap's styling, it doesn't appear that the date picker is being implemented in that field. when clicking into the field noting comes up and my typing is unrestricted. Does this input type of date not natively create an input field with a type of date and make the input field a date picker? JSBIN Code Here My console shows no errors.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>JS Bin</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<form>
<div class="form-group">
<div class="row">
<div class="col-md-4 box">
<label>Date</label>
<input type="date" class="form-control" placeholder="Date">
</div>
</div>
</div>
</form>
if someone could explain why it's not working I would appreciate it.
The native <input type="date"> only works in a few browsers. IE is not one of them, although it does now work in Edge.
See the support table here: http://caniuse.com/#feat=input-datetime
You will need to use a polyfill library or datepicker JS plugin to get it to work everywhere. I recommend checking out Webshim: https://afarkas.github.io/webshim/demos/#Forms-forms-ext
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With