Datepicker: Form that offers edit date functionality is empty on load

Datepicker: Form that offers edit date functionality is empty on load

Hey there. I have a php that pulls data from a flat txt file and populates a form. One of the fields is DATE. The date format is in the format "Wed, 02 Jun 2010 20:25:17 -0700". But I only want the first few pieces of date data to show in the field. (Wed, 02 Jun 2010)

When I try to call the page I get a blank field for date. I'm instantiating datepicker like this:

$(function() {
$('#datepicker').datepicker('option', {
dateFormat: 'D, d M yy',
showOn: 'button',
buttonImage: '/images/calendar.gif',
});
});

Any idea to get "Wed, 02 Jun 2010" in my text field? Am I not using a valid format? Should I use the standard format and create the format I need before writing it to the text file?

Thanks!

Dave