I have my datpicker installed
$("#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 hard-coded. It is assumed that it will be replaced by some code. However, the date picker refuses to pick a date! He always shows me the current date. It is impossible to find out why. I even tried to specify a date in a string +7, etc. But today, the date of the date is displayed as the default date.
What could be the reason for this?
UPDATE
An element with the schedule_date_163 parameter is not a text field. Its a div.On click, which runs the datepicker japcript script written above.
<div id="scheduled_date_163">
<p class='date'>None</p>
</div>
There is no way to repeat the div id on the page.
source
share