1

I am doing a calendar with Jquery Datepicker and I have to set the initial date in '1/1/2013'. That means that the first date that shows the datepicker must be that. I have tried that:

 $(function() {
   $('#datepicker').datepicker({minDate: '01/1/2013'})
 });

But I dont obtain what I am searching for. I am reading in this page and I found another example:

$(function() {
   var date = new Date(); // replace with your date
   $('#datepicker').datepicker().val(date.asString()).trigger('change');
});

But it doesnt work.

If anyone can help me, I will be very pleased

4

1 回答 1

1

尝试这个:

$('#datepicker').datepicker("setDate", new Date(2013,00,01));

小提琴

于 2013-05-04T17:12:11.693 回答