Date Picker inside a Dialog

Date Picker inside a Dialog

I know there are some outstanding issues with this combination but I don't think they pertain to this instance. I have a link on a page that opens a dialog. On the dialog there is a form and the first element is an input field with a datepicker. When the dialog opens the focus falls on the date picker and it automaticly expands. If I click away, it disappears and when I click back to the input field nothing happens. If I click on a date it disappears but does not populate the date in the input box. Here is the only JS on the page:

  1. $(function(){
      
        $('#createItem').dialog({
            autoOpen: false,
            modal: true,
            draggable: false,
            resizable: false,
            height: 700,
            width: 625,
            buttons: {
                "Continue": function() {
                    $(this).dialog("close");
                }
            },
            open: function(){
                $('.hasDatepicker').datepicker('dialog');
            }
        });


    });

    function showCreate(){
        $('#createItem').dialog('open');
    }























I am using JQuery 1.4.2 min from Googles CDN as well as JQuery-UI 1.8.1 min also from Google. I'm testing using Firefox on Ubuntu. Any suggestions would be appreciated.