0

I made a post about this a while back and never got a firm fix for this, so excuse my double posting.

I've got a jQuery DataTable and I've got my dates in the second column in MM-DD-YYYY format. I'm trying to get my date range picker to work with it, so my datatable only shows rows with dates within the range in the picker.

Poultry in Motion kindly made the jsFiddle for me with my code and it is working perfectly there. Although on my website, it isn't working. I've tried the exact same scripts as the fiddle has. Except my jquery is a different version. Even when I switch it to 3.2.1 I still get the same error as with 1.12.4.

The error is:

Uncaught TypeError: Cannot read property 'apply' of undefined at HTMLInputElement. (jquery-ui.min.js:9) at Function.each (jquery-1.12.4.min.js:2)

What could my problem be?

1
  • How on earth should anyone be able to answer that? It seems to me it is the datepicker that is relying on a certain version of jquery-ui, but how should I know? The error could theoretically be triggered by anything else. Commented Nov 4, 2017 at 12:02

1 Answer 1

0

You seem to be using a mismatched version of either jQuery or more likely jQueryUI. Switch the version on your website to be the exact same as in the working jsFiddle.

Moving to a newer version of the libraries that is not the same as the working jsFiddle version is not an acceptable fix, you need to match the exact version to debug this issue.

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

1 Comment

I fixed the issue. It appears it happened to be a datatable version mismatch. In my website I was using 1.10.10, but when I use 1.10.15 the issue is fixed. Thanks for the comment!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.