Dialog clone + datepicker

Dialog clone + datepicker

I have dialog clones that pull source from another file.  I would like to have datepicker on these dialogs but I am not sure how to do this.  I am able to do this on the regular dialog (non-clone) by using:
<script type="text/javascript">
    $(function() {
        $("#enddate").datepicker();
        $("#startdate").datepicker();
    });
    </script>
Can someone help me please?