2018-12-16

Online Date Entry

One of the most frequently encountered problems is getting users to enter dates correctly. (This is only intended for dates which cover a large number of years.) To mitigate the problems and to simplify the process, I suggest that designers proceed as follows:
Limit the dates to a finite number of years – specify both the earliest acceptable year and the latest acceptable year. Ask the user to enter the year as a 4-digit number (YYYY). Immediately check if it is within your acceptable range. If not ask the user to reenter it.
Once an acceptable year has been entered, get the user to pick the month from a drop-down list that looks like this:
01January
02February
03March
04April
05May
06June
07July
08August
09September
10October
11November
12December

At this point the user only has 4 lists of numbers from which to choose a correct day of the month. The shortest list will be for February when the year entered is NOT a Leap Year (i.e. 1 to 28). When the year entered is a Leap Year and the month is February the list will be from 1 to 29. The other months are either 30-day months or 31-day months. The list from 1-30 can be presented for all 30-day months (April, June, September and November), and the list from 1 to 31 for the 31-day months (January, March, May, July, August, October and December). These should all be simple drop-down lists.

So, What is a Leap Year?

In every 400 years there are 97 leap years, into which an extra day is added. The Leap Year Day added is always February 29th. They were introduced to stop religious holidays from creeping through the seasons. If the year is evenly divisible by 400 it is a leap year. Any other year evenly divisible by 4, but not also evenly divisible by 100, is a leap year.