I am using the UI DatePicker from jQuery UI as the stand alone picker. I have this code:
And the
$("#datepicker").datepicker({ dateFormat: "yy-mm-dd" }).val()