I am working on a ajax based application and try to add the jquery datepicker (and its timepicker extension) to a few forms. They provide just the functionality I need. The basic problem I have now is to deal in an environment where the DOM is not complete or better triggered within the application (clicking the edit button or add button) to generate a form. So integrating the datepicker is no easy task (or?). I can not use the document ready function, because by the time onload is finished already, the forms containing the datepicker elements are not present after onload. So I thought I wrap the datepicker call into a function on trigger it via onclick, like this:I am working on a ajax based application and tr