Help text for 4 digit year

by KristinG   Last Updated October 10, 2019 14:16 PM

I am designing an input field for a year, that needs to be 4 digits. YYYY as help text does not seem very clear when it is not combined with MM/DD. What is best practice here? Current Design

Answers 4

The easiest way might be to provide the help text next to the label, and provide simple validation for when a user fails to input the required pattern.

I don't believe "4 digits" is necessary or common in forms requesting a full year be entered. I have commonly seen "YYYY" used in the context of years, so that should not be an unexpected use here.

showing form validation process for invalid 2-digit year

This should clearly show the user the issue, and instruct them as to how to fix it.

October 10, 2019 14:35 PM

YYYY, besides DD and MM is standardized international format used across devices and softwares.

You have no need to change that. You could place YYYY not as help text, than as Placeholder. Also you could provide Input Field validation with underscores or easy background to display 4 digits. ( _ _ _ _ )

October 10, 2019 14:37 PM suggests giving an example for the fully completed set of fields (dd, mm, yyyy) as per their date input design system.

In your example you could use this same approach and instead of writing YYYY as a hint, you could say For example 1999.

enter image description here

October 11, 2019 18:25 PM

Kristin, what are the typical years that users would enter into this field due its intended use? Based on that, you could come up with an algorithm that would automatically create a four-digit year when a user enters fewer than four digits.

As an ad-hoc example, of these were years of birth, than you can safely assume that any year would be less than, or equal to, 2019. Hence, if a user'd type, "19", the field could become "2019" as soon as the user tabs out of the field. Similarly, "23" would become "1923," etc.

Even though this'd take a bit of work to make it operate smoothly for three- and single-digit entries, it'd still save users some effort and head-scratching if they enter a two-digit year, particularly since they will (likely) not be confronted with an annoying formatting error message.

As for the layout with the help text, you might get away with not having to change anything. Make sure, though, that you do test the field with your intended users to see if they find it usable.

October 20, 2019 01:40 AM

Related Questions

Updated April 08, 2015 18:06 PM

Updated June 09, 2015 12:07 PM

Updated August 06, 2016 08:06 AM

Updated July 10, 2016 08:06 AM

Updated March 28, 2018 23:16 PM