I'm adding a date picker to dynamically generated fields.
('#addScnt1').live('click', function() {
$('<p class="textocampodetexto" style="margin-left:20px; margin-top:20px;">
<label for="p_scnts1"> <input id="au_fechainicioperiodo2"
name="au_fechainicioperiodo2" type="text" size="7"
value="" /> </p>').appendTo(scntDiv);
Those fields are added when I click an 'Add Field' button.
The date picker doesn't appear when I click on the generated field. I know the datepicker is working because I put the code outside the javascript code and it works.
How can I achieve this then?