Testing functionality in javascript (making calendar clickable)