1

So, I am using a very simple Datepicker. It works fine in Firefox and Chrome. But not at all in IE. I am relatively new to jQuery and cannot figure this out. Here is my code. I stripped it down so that this page has nothing but the datepicker on it, but still doesn't work.

<!DOCTYPE html> <html> <head> <title>Testing</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" /> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script> <script> $(document).ready(function() { $('#txtDate').datepicker({ showAnim: 'slide', dateFormat: 'mm-dd-yy', }); }); </script> <style> body { font-family:Arial; font-size : 10pt; padding:5px; } </style> </head> <body> <input type='text' id='txtDate'> </body> </html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

8
  • 2
    Can you define "doesn't work"? Also, what versions of IE? Commented Nov 3, 2014 at 14:45
  • IE 11. And it does nothing... If I click in the text box which should bring up the calendar, nothing happens other than the cursor starts blinking.. Commented Nov 3, 2014 at 14:50
  • possible duplicate of "Object doesn't support this property or method" error in IE11 Commented Nov 3, 2014 at 15:11
  • I set up and test and ran this in IE 11 and jQuery threw this error: "Object doesn't support property or method 'addEventListener' which already has an answer, here: stackoverflow.com/questions/18829292/… See if that helps! Commented Nov 3, 2014 at 15:12
  • For the record, opening up the Developers Tools when you are having this sort of problem (F12 key in Chrome and IE11) can get you to the Javascript Console, which will output errors in your script to the screen so you can more easily figure out what is happening: developer.chrome.com/devtools/docs/console Commented Nov 3, 2014 at 15:17

1 Answer 1

1

Apparently, it was a server issue. I used the method described on the link suggested by Mark. That didn't work on the development server so just to be sure, I tried it on the development server and it does work. Thanks Mark.

Sign up to request clarification or add additional context in comments.

1 Comment

No problem, incidently enough I had similar problems until I switched to a local version of jquery: working in Chrome but not in IE. Dunno why.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.