I have a function that executes a query to get some data based on a certain date range which is selected using .datepicker(). I am trying to set the datepicker\'s that are
When you trying to call setDate you must provide valid javascript Date object.
queryDate = '2009-11-01';
var parsedDate = $.datepicker.parseDate('yy-mm-dd', queryDate);
$('#datePicker').datepicker('setDate', parsedDate);
This will allow you to use different formats for query date and string date representation in datepicker. This approach is very helpful when you create multilingual site. Another helpful function is formatDate, which formats javascript date object to string.
$.datepicker.formatDate( format, date, settings );