Split the calendar year and month updates out of updateView. When updateView is triggerred by the mouseLeave events, it was causing the month and year dropdown values to be reset to the start and end date's month and year values. These are not necessarily the same as what is selected in the dropdowns.