Skip to content

Instantly share code, notes, and snippets.

@sunnydoll
Created December 2, 2015 17:07
Show Gist options
  • Save sunnydoll/759a5cdf49f495feab1b to your computer and use it in GitHub Desktop.
Save sunnydoll/759a5cdf49f495feab1b to your computer and use it in GitHub Desktop.
HTML5 Input Type=date Working under IE 11
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
</head>
<body>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script>
<script>
webshims.setOptions('forms-ext', {types: 'date'});
webshims.polyfill('forms forms-ext');
$.webshims.formcfg = {
en: {
dFormat: '-',
dateSigns: '-',
patterns: {
d: "mm-dd-yy"
}
}
};
</script>
<input id="d1" type="date" />
<input id="d2" type="date" />
</body>
</html>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script>
<script>
webshims.setOptions('forms-ext', {types: 'date'});
webshims.polyfill('forms forms-ext');
$.webshims.formcfg = {
en: {
dFormat: '-',
dateSigns: '-',
patterns: {
d: "mm-dd-yy"
}
}
};
</script>
<input id="d1" type="date" />
<input id="d2" type="date" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment