resolve bug in calendar selection