I know this question has been asked on SO before, but I can't figure out what I'm missing. Here is a simple Fiddle.
The jquery:
var myDate = new Date(1978,2,11)
$('#datepicker').datepicker('setDate', myDate);
You have to initialize the datepicker first:
$('#datepicker').datepicker();
When you pass setDate, you are calling a method which assumes the datepicker has already been initialized on that object.