JQuery Date Range Picker gives error in Google Chrome
I am using jQuery Date Range Picker with a bunch of threads .
My code is such that I create a textbox dynamically, or rather an AJAX request returns the HTML of the form. When I dump the HTML into my page, I call a script that calls a function daterangepicker()
that should turn the input field into a date range picker set.
My code works fine in Firefox and Internet Explorer, however it just dies in Google Chrome. The script doesn't run and I get this error in the logs:
Uncaught Error: INVALID_NODE_TYPE_ERR: DOM Range Exception 2
What could be the problem? I really need to fix this - the exception is being thrown inside the main jQuery code. The date picker seems to work great when I go through the demo of the site.
You are not suggesting that this has to do with being called to attach to an element created by an AJAX request at runtime. No matter what I need to get this work benefit and appreciate any help.
a source to share
I had the same problem and the Chrome debugger notes that the error is in the jQuery library version 1.3.2
I looked at the source for the daterangepicker threads demo page and it turns out they are using the jquery 1.3.1 library
... src = "js / jquery-1.3.1.min.js"
I ran a test using 1.3.1 instead of 1.3.2 and it worked on my site.
I recommend testing the browser and using 1.3.1 in case the user is using chrome.
All the best, Yehuda