I have the following jQuery script defined on all my forms.
$( "input:text.datepicker" ).datepicker({
yearRange: "1900:+0",
changeMonth: true,
changeYear: true
});
Basically this invokes the date picker on any input element that is of type text and has the class "datepicker".
This works fine on all pages, except in one situation which I describe below.
I have to load a form by ajax, which is then displayed in a jQueryUI Dialog. In this dialog I can only get the date picker to display if I include the java-script code again. Obviously I don't want to include the code twice. Is there a way to get the newly loaded textbox to display the date picker somehow?
Thank you