Hi NK,

I too had this problem, its quite easy to resolve when you discover
the source of the problem.

The datepicker adds a 'hasDatepicker' class to each object you add it
to, it uses this class to detect if the datepicker has already been
added. No doubt in your code you're copying the form with
'hasDatepicker' fields but not copying the bindings.

You have two options: be very careful when assigning the datepicker so
that its only done in the last minute and you remove the entire
section when you're done, or, remove the hasDatepicker class manually
when you know you've copied the HTML and potentially lost the
bindings, probably messy.

Hope that helps!

sam



On Jul 12, 9:34 pm, NK <[email protected]> wrote:
> I have a table, which is made out of divs.
>
> When you click on a row , a div right below that row slides down. The
> content of that new div is loaded using jquery .load. That content is
> a form with a date input field. When a user click the input field I
> want the jquery datepicker to load.
>
> I have figured out how to attach the jquery datepicker using .live so
> that it loads on each datefield even if they are loaded through ajax
> and not at the first page load.
>
> What I'm having an issue with is that there seem to be a problem
> attaching the datepicker to its respective input field.
>
> The first time the datepicker is loaded by clicking a input field, it
> works fine. You pick a date and it updates the input field with the
> right value. But if you try to use the datepicker on any other ajax
> loaded input fields, the datepicker shows up next to the right field
> but tries to input the value into the original input field. Even if
> the div contained that original input field has since then been
> hidden.
>
> Any clue on how to fix this? Let me know if I need to provider more
> details or explanations.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to