views:

344

answers:

1

In my view I`m using an Ajax call to dynamically show a form to add a new entry to a list. After the entry has been added sucessfully the list will be shown again.

However, in this form I have a textfield where the user needs to type in a date. What would I need to do to dynamically bind the jquery UI DatePicker to this field?

A: 
$('#textfield_id').live('ready', function(){ $(this).datepicker(); })

Not sure about exact names of datepicker and textfield, but this should work for any textfield added to the page with this id, at any point through ajax or not.

Dmitri Farkov