Jquery Datepicker not selecting the default date
Posted
by Chirantan
on Stack Overflow
See other posts from Stack Overflow
or by Chirantan
Published on 2010-04-26T07:11:58Z
Indexed on
2010/04/26
7:53 UTC
Read the original article
Hit count: 373
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?
© Stack Overflow or respective owner