I have a jQuery.dialog who show a form.
The first input is and I init the datepicker like this
jQue
Starting from jQuery UI 1.10.0, you can choose which input element to focus on by using the HTML5 attribute autofocus.
All you have to do is create a dummy element as your first input in the dialog box. It will absorb the focus for you.
This has been tested in Chrome, Firefox and Internet Explorer (all latest versions) on February 7, 2013.
http://jqueryui.com/upgrade-guide/1.10/#added-ability-to-specify-which-element-to-focus-on-open