You have to initialize the datepicker before calling a datepicker method
Here is a
Working JSFiddle.
$("#mydate").datepicker().datepicker("setDate", new Date());
//-initialization--^ ^-- method invokation
<link href="https://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<input type="text" id="mydate" />
P.S: This assumes that you have the correct date set in your computer