selected date clears when it needs too