// Functions for calendar //this function is called when date is selected in calendar function onDateChange(sender, selectedDate) { var month = selectedDate.getMonth(); var day = selectedDate.getDate() - 1; var year = selectedDate.getFullYear() - 1999; // demonstrates setting values of drop-downs // document.getElementById("selMonth").options[month].selected = true; // document.getElementById("selDay").options[day].selected = true; // document.getElementById("selYear").options[year].selected = true; document.getElementById("proposedDateHidden").Value = selectedDate; alert('You have changed the event date to ' + selectedDate.toDateString()); } //displays how to set the date in the calendar control function selectDate() { var month = document.getElementById("selMonth").selectedIndex; var day = document.getElementById("selDay").selectedIndex; var year = document.getElementById("selYear").selectedIndex; var selectedDate = new Date(year + 1999, month, day + 1); calDate.setDate(selectedDate, selectedDate); }