fix deselection of invalid dates - closes #1