Reputation: 99
I know this question has been asked a lot, but I could find a solution that works for the latest version which by default shows current date on open. Any ideas how to change this to some static date (2011.09.21) ?
I wrote this as a seperate script:
<script>
function(){
$(".single-product .i2").datepicker({
defaultDate: '2011/09/09'
});
};
</script>
But it still loads default date.
Upvotes: 0
Views: 72
Reputation: 207901
Use the defaultDate parameter:
$("#datepicker").datepicker({
defaultDate: '09/21/2011'
});
Upvotes: 1
Reputation: 6956
$('.selector').datepicker('setDate', new Date(2011, 8, 21))
Upvotes: 0