Jquery Datepicker not selecting the default date
- by Chirantan
I have my datepicker set up like this
$("#scheduled_date_163").datepicker({
onSelect: function(dateText, inst) {
jQuery.get("/tasks/inplace_edit?id=scheduled_date_163&class_name=Task&value=" + dateText, function(data){
$('#scheduled_date_163').html(data);
$('#scheduled_date_163').removeClass('hasDatepicker');
})
}
});
$('#scheduled_date_163').datepicker( "option", "defaultDate", $.datepicker.parseDate("d m y", "31 8 2009") );
As you can see the date is hardcoded. It is supposed to be replaced with some code. However, the datepicker refuses to pick the date up! It always shows me the current date. Unable to figure out why. I even tried giving the date in string and +7 etc. But today's date itself is shown as the default date.
What could be causing this?