Latest datatables.js

Latest datatables.js

purushottampurushottam Posts: 3Questions: 0Answers: 0
edited June 2023 in Free community support

I am using datatables.js which is build with jQuery version 2.2.3 ,now i updated the datatables to latest version but that is breaking my datepicker or datetimepicker. Most of time that is happening after ajax calls. If I open calendar then after that no issue and again after ajax call issue is happening. This is working with previous datatables.js

Any suggestions or help will be appreciated. I almost spend 5 days to figure out what is wrong.

Error getting missing instance of datepicker for this data and it's pointing to datatable.min.ns

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    We're not aware of any issues. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Colin

  • allanallan Posts: 63,515Questions: 1Answers: 10,472 Site admin

    My guess is that you are loading jQuery twice? That would cause what you describe.

    Allan

  • purushottampurushottam Posts: 3Questions: 0Answers: 0

    Thank you all . I am able to figure the issue. I have below lines of code.

    Var $datepickerSelect=$('.ui-datepicker-current-day'):
    $datepickerSelect.click():

    This click event caused the issue. This was written by some one who was working earlier for the application. Any idea why this line cause the issue.

    Thank you for your response.

  • kthorngrenkthorngren Posts: 21,337Questions: 26Answers: 4,954
    edited June 2023

    Without seeing the problem occur its hard to say. But I would guess that the .ui-datepicker-current-day selector is not available in the web page when that code executes. Please post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Did you verify that jquery.js is not being loaded twice?

    Kevin

Sign In or Register to comment.