Datepicker in modal dialog : problem with populating a date field

Datepicker in modal dialog : problem with populating a date field

Hi,

I have a modal dialog which contains a form loaded via ajax. In the form is a date field which is populated using the jquery datepicker. All works well if I open the dialog one time. If I load the dialog a second time without refreshing the page the datepicker works but the selected date is not assigned to the date field. The value of the date field doesn't chance.

Maybe someone has an idea how to solve this ?

Thanks in advance