Refactored calendar to pass date