fires when the user clicks on a date in a calendar
myCalendar.attachEvent("onClick", function(date){ // your code here });