Solved

uncaught exception: Missing instance data for this datepicker

Posted on 2015-02-24
1
1,135 Views
Last Modified: 2015-02-25
Hi, I'm using vs2012.
My jQuery datepicker was working fine but something I did recently broke it in Firefox.  In IE and Chrome it's working just fine.  I get this error when I click on the cell in a Gridview control where the datepicker supposed to pop up but instead I would get this error in FireBug.  What does this mean and how to fix it?  Thank you.

    <script>
    $(document).ready(function () {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(bindPicker);
        bindPicker();
    });
    function bindPicker() {      
            $("input[type=text][id*=txtExpDate]").datepicker();
    }
</script>
0
Comment
Question by:lapucca
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40630723
I found some code that uses the "live" function to solve that error:

$('.date').live('focus', function(){
    $(this).datepicker({
        changeMonth: true,
        changeYear: true,
        yearRange: '1930:'+(new Date).getFullYear()
    });
});

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Hovering effect 9 29
Expando 4 34
Why is "packages element is not declared"? 2 40
Achieve json result 2 34
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now