I'm not sure I really understand what the problem is?
$(document).ready(function() {
$('#date_field').datepicker({
dateFormat: 'yy-mm-dd',
constrainInput: false});
});
and just have a standard value in the input field you have:
<input name="date_field" id="date_field" value="2008-04-16" />
or you could just set the value in document.ready
$('#date_field').val("2008-04-16");
after you add the datepicker.
I'm not sure if that's what you mean?
Ok, after your comment I have a feeling you want something similar to this:
var my_date = new Date(); //This is the Date object that you're getting from external source
$('#date_field').val(my_date.getFullYear()+"/"+my_date.getMonth()+"/"+my_date.getDate());
This should set the value in the field to be 2008/04/26 (or whatever)