The datepicker 'setDate' method, as described
here http://docs.jquery.com/UI/Datepicker#method-setDate
is not working as expected.
The datepicker is always taking browsers current date. But I want to
set the current date of my choice.
Code:
$(target).datepicker({
dateFormat: $.datepicker.W3C,
closeText: 'X'
});
//set the current date
$(target).datepicker('setDate', currentDateObj);
//checking the current date.
alert($(pTarget).datepicker('getDate'));
where currentDateObj is a javascript date object containing date 1st
august 2009.
When I alert the "getDate" it alerts 1st august 2008, but when I open
the datepicker it displays the browsers current date ie. 31st august
2009 .
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---