Can't seem to get the Datepicker working inside a Dialog

Can't seem to get the Datepicker working inside a Dialog


I can't seem to get the Datepicker working inside a Dialog. When the
user clicks on the relevant text field, the Datepicker spawns
underneath the dialog box so I can't see it. When the dialog box
closes, the Datepicker is still visible :-(
Am I setting this up wrong?