Make sure entered dates map to an existing date (see #5086)