In the jQuery UI datepicker Docs ( http://jqueryui.com/demos/datepicker/ ) it says you can change the default date after init with
$( ".selector" ).datepicker( "option", "defaultDate", +7 );
Where +7 can be a date string, date object, or number of days from today
I can’t seem to get this to work. If I set the defaultDate when initializing like this
$(".selector").datepicker({defaultDate:myDateObject});
it works but if I try to use the accessor method I can’t get it to work.
Can someone try this and let me know if it works for them and if I’ve just lost my mind somewhere.
EDIT: Here is a jsFiddle for an example
http://jsfiddle.net/Bkw7H/
It’s a known bug: http://bugs.jqueryui.com/ticket/6195
Apparently the bug doesn’t occur with input elements.