Below is the config of my datepickers.
$("#leaving,#returning").datepicker({
numberOfMonths: [1,1],
showOn: "focus",
defaultDate: "today",
changeFirstDay: false,
minDate: "today",
maxDate: "+330d",
hideIfNoPrevNext: true,
onSelect: function(dateText, input) {
if(input.id == "leaving"){
var leaving =
$("#leaving").datepicker("getDate");
var returning =
$("#returning").datepicker("getDate");
if(returning != null && leaving>returning) {
$("#returning").datepicker("setDate",
leaving);
}
}
},
beforeShow: customRange
}).attr("readonly", "readonly");
The only way to default the date is to call
$("#leaving").datepicker("setDate", "today");
$("#returning").datepicker("setDate", "+3d");
This causes the second datepicker to display as the page is loaded. Is this
the default behavior? I tried to add the following and it does not help.
$("#returning").datepicker("hide");
$("#leaving").datepicker("hide");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---