Date

The date picker can be used when selecting a (relatively) recent date. To select dates that are far in the past (or future) a date field can be used instead.

On this page:

Date picker

Use the date picker if something is being planned, or for selecting a (relatively) recent or close future date.

Guidelines:

  • The date picker is not recommended if your goal is to collect birth dates or other dates further back in time (see studies from gov.uk)
  • In these cases you should instead use a date field.
  • Add correct validation and give the user information about what are valid and invalid dates. Should the user be able to select dates further back in time? Within a given period?

Example of usage:


Date field

Date fields should be used for dates further back in time, or for dates that the user knows well. Three textfields is the simplest way to take in dates in these cases. If someone is planning something and a specific day (monday, friday, etc.) is important the datepicker should be used instead.

⚠️ This component is not accessible in Altinn Studio yet.

Guidelines:

  • Always label the input boxes (day, month, year), and add a label/heading for the input group as well.
  • If the foundational data exists, a specific date can be suggested in the field, or it can be preset with the current date.