commadelimited/autoComplete.js

Doesn't work in IE8

Closed this issue · 2 comments

The newest version (1.5.0) doesn't seem to work to in IE8 or IE7. The problem also occurs in the example.

I think the problem is with Date.now, which doesn't exist before IE9. The following code fixes this:

if (!Date.now) {
  Date.now = function() {
    return new Date().valueOf();
  }
}

Found it on http://blog.yjl.im/2012/01/datenow-in-ie8-or-before-ie9.html

Nice one Niek. Would you be interested in submitting a pull request for that change? I'd love for you to get credit for the fix.

Here is the pull request: #46

Let me know if it's alright.