Jump to content

My jquery datepicker isnt working in IE


wright67uk

Recommended Posts

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/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" 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>

Link to comment
Share on other sites

I'm a bit new to this, but I've gone into the page were talking about in ie and pressed f12, I've gone through the various tabs, profiling and debugging buttons and I can't find any errors.

 

I've also tried Tools >> Internet Options >> Advanced Tab >> Browsing >> Check the "Display a notification about every script error" checkbox.

Link to comment
Share on other sites

A quick google of the subject results in this being a common problem. However, most people report that it is a problem with either:

 

1) Compatibility mode being turned off

 

or

 

2) Running the 32-bit version instead of the 64-bit

Edited by SocialCloud
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.