I have a method that creates a form in my controller:
...
sbReturn.Append(String.Format("<p id='planSetupAddNewEffectiveDate'>"));
sbReturn.Append(String.Format("<label for='txtPlanSetupAddNewEffectiveDate'>Effective Date </label>"));
sbReturn.Append(String.Format("<input type='text' id='txtPlanSetupAddNewEffectiveDate' class='plansetupdate' />"));
sbReturn.Append(String.Format("</p>"));
...
Is there a way to attach a datepicker to that text field?
I've tried the standard
$(".plansetupdate").datepicker();
and
$("#txtPlanSetupAddNewEffectiveDate").datepicker();
but neither actually generates the datepicker. I know when trapping events from dymically added controls (ie. buttons) .live is used (ie. xxx.live('click', function()...), is there something similar for this case?