问题
I think I'm missing something pretty straight forward here..
How do you set the default date on the jqueryui to tomorrow ?
回答1:
Initialize a datepicker with the defaultDate option specified.
$( ".selector" ).datepicker({ defaultDate: +1 });
Get or set the defaultDate
option, after init
.
//getter
var defaultDate = $( ".selector" ).datepicker( "option", "defaultDate" );
//setter
$( ".selector" ).datepicker( "option", "defaultDate", +1 );
see: http://jqueryui.com/demos/datepicker/#option-defaultDate
回答2:
Or if your don't want back dates then you can use as this while initialzing the datepicker
minDate: +1
来源:https://stackoverflow.com/questions/6831679/jquery-ui-datepicker-set-tomorrows-date-as-default