Using ui.datepicker inside an AJAX dialog?

Using ui.datepicker inside an AJAX dialog?


I'm trying to use the Date Picker inside an div where I'm loading the
content via AJAX. It keeps blowing up on the following line inside
ui.datepicker.js:
    
/* Initialise the date picker. */
$(document).ready(function() {
    $(document.body).append($.datepicker._datepickerDiv)
        .mousedown($.datepicker._checkExternalClick);
});
I'm using the Date Picker v3.4.3 and jQuery v1.2.3.
Can I not load the date picker dynamically?
-Dan