Solved

uncaught exception: Missing instance data for this datepicker

Posted on 2015-02-24
1
1,263 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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