clean up setting code for calendar selection