Why isnt my jquery datepicker working in IE?
This code works well in firefox and chrome, but in IE
I have just a blank box and nothing happens when I click in the box.
Can you tell my why this isnt working in IE?
(tested on IE.9)
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/li… type="text/javascript"></script>
- <script src="https://ajax.googleapis.com/ajax/li… type="text/javascript"></script>
- <script>
- (function() {
- var elem = document.createElement('input');
- elem.setAttribute('type', 'date');
- if ( elem.type === 'text' ) {
- $('#date').datepicker({
- dateFormat: 'dd-mm-yy',
- // defaultDate: +5
- maxDate : +3
- });
- }
- })();
- </script>
- </head>
- <body>
- <form>
- <input type="date" name="date" id="date" value=" " />
- </form>
- </body>
- </html>