I'm using datepicker for selecting dates in two date fields (from date and to date).
In those, the default highlighted date is today date. I need to change the default highlighted date to some other day in the second datepicker. (as a example today + 8 days).
How can I do this correctly ?
following are my datepickers,
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker" ).datepicker("option", "dateFormat", "yy-mm-dd"); // ISO 8601
$( "#datepicker2" ).datepicker();
$( "#datepicker2" ).datepicker("option", "dateFormat", "yy-mm-dd");
});
Thanks.
---------------------------------- Update -----------------------------------------------
Following the screen shot for Michael,
I put the following,
$( "#datepicker2" ).datepicker("option", "defaultDate", +2);
You can see still the 21 day (today) is Highlighting and 23 is bordered with black line. I need see 23 looks like 21 with hi lighting. No need to highlight 21.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…