rangeSelect highlighting when datepicker loads
I'm using a version of datepicker as a browse widget for some
archives. It works great when selecting a single date and returning
results for that date. Here's some code so you can see what I mean:
<script>
var selectedDate = new Date("<evX.StartTime format="strftime:%B %d %Y
04:00:00" offset="+0d">");
$(document).ready(function(){
// api documentation for datepicker is here:
// http://docs.jquery.com/UI/Datepicker/
$(".myDate").datepicker({ changeMonth: false,
changeYear: false,
highlightWeek: true,
showOtherMonths: true,
defaultDate: selectedDate,
minDate: "-1m",
maxDate: "+2m",
prevText: '',
nextText: '',
rangeSelect: true,
onSelect: function(dateText) {
var selectedDateArray = dateText.split("/");
var urlDateString = selectedDateArray[2] + '-' +
selectedDateArray[0] + '-' + selectedDateArray[1];
window.location = "AT_datepicker.html?
StartTime="+urlDateString;
}
});
});
</script>
here, the defaultDate is populated by retrieving whatever's assigned
to the GET variable StartTime.
I'd also like to offer users the chance to get results on a
range...datepicker seems to support this, with the exception that I
haven't found an argument that allows for a ranged highlight when
datepicker first loads.
is there some kind of "defaultEndDate" option that would allow me to
do the above for ranged selections?