What do you think would be the preferred way of handling invalid date input on a desktop GUI?

Let's say the user needs to set a date range, e.g. for a search. And he sets the start date to 2018-06-01 and the end date to 2018-05-02, i.e. the end date is before the start date.

enter image description here

Alternative number 1 is that the system auto correct the end date, to the same date as the start date. There might be a highlighting animation informing the user that something was changed (however, he might miss it if he does not look at that input during that second).

Alternative number 2 is that we just display an error message, and the user will have to correct the error himself.

2 Answers 2


If a user does not recognise the autocorrection, she might think that the result is the result of the intended search criteria. Therefore I would strongly recommend not to autocorrect the input.

But I can think of a third solution. What your search criteria does is search results between two dates. If you ask the question like "show all items with date between date A and date B" it does not matter in which input field the lower date is given. The result will always show exactly what the result according to the users input without annoying with autocorrection or error messages.


Use a date picker instead. That way you can prevent 'invalid' dates. Your example is a recent date so assuming that would be useful.

When you say invalid dates I was expecting things such as 13/13/2018, there are only 12 months so it's not an actual date. Or 32/11/2018, there is no month with 32 days. I've not seen your type of formatting very often been used in an input field, is this the right choice for your users?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.