• Home
  • Getting started
  • Foundation
  • Components
    • Accordion
    • Avatar
    • Badge
    • Bet Button
    • Bet Prediction
    • Bottom Sheet
      Deprecated
    • Button
    • Callout
    • Card
    • Carousel
    • Checkbox
    • Composable Modal
    • Date Picker
    • Dialog
    • Drawer
    • Floating Action Bar
    • Input
    • Notice
    • Pagination
    • Popover
    • Price label
    • Radio group
    • Select
    • Separator
    • Slider
    • Snackbar
    • Switch
    • Table
    • Tabs
    • Tabs Menu
    • Toggle Group
    • Tooltip
  • Patterns
  • Writing (SE)
  • Guidelines
  • Brand portal

Search the design system

Components

Date Picker

View as markdown (opens in a new tab)

Date Picker allows for selecting a date or a range of dates from a calendar view.

Date picker

Usage

Use the Date picker to provide the user an intuitive way to pick a singular, or a range of dates.

Calendar

The Calendar and the Date picker consist of two separate components, where the former typically is triggered by the latter.

Typically the Date picker will be used to reveal the calendar and allow the user to pick a date, or dates, however the calendar can be displayed on its own or be triggered by another component.

Calendar

The Calendar displayed standalone.

Select a default value when appropriate

For many situations a pre-selected date may aid the user in completing a task.

Select a default value when appropriate – 1
Select a default value that reflects the most common use case.
Select a default value when appropriate – 2
Don’t present the Date picker blank if a default selection can aid the user.

Formatting

Anatomy

The Date picker component is made up of a Calendar for picking dates, and a field similar to the Input component for displaying the currently selected date(s), or a placeholder if no selection has been made.

Anatomy
  1. Label
  2. Placeholder / Input text
  3. Calendar icon
  4. Container
  5. Help text

Label

Describes the expected input, e.g. “Select your birth date”. Keep the label text short, clear and concise, and aim to make it no longer than a few words.

Placeholder text

The place holder text can provide a hint regarding the expected format. Keep in mind that once the user starts interacting with the Date picker, the placeholder text is replaced with the user input. As such it is important to make sure important information is available in the label or help text.

Input text

The selected date provided by the user, or pre-selected by the system.

Help text

The help text is an optional field that can be used to provide additional guidance or contextual information about the expected input. Consider using the help text when extra clarification is needed for the user to complete their task.

Error text

Error text is displayed when validation fails and is used to inform the user that the selected date is incorrect, and ideally what needs to be corrected in order to achieve success.

States – Date picker

The Date picker displays interaction states similar to input fields and the select component.

The Date picker displays interaction states similar to input fields and the select component.

Default

States – Date picker – 1

The default state prior to user interaction, displaying a placeholder text.

Hover

States – Date picker – 2

On desktop devices the Date picker will react to a hovering cursor.

Focus

States – Date picker – 3

The Date picker is in focus and is available for accepting input.

Filled

Filled – 1

The Date picker with a selected date, either selected by the user, or a default selection by the system.

Error

Error

An incorrect date is selected. Attempt to prevent the user from making erroneous selections.

Disabled

Disabled

The Date picker is not available for interaction.

Calendar

Calendar
  1. Container
  2. Title
  3. Month Navigator
  4. Weekday
  5. Date cell – default
  6. Date cell – selected
  7. Date cell – current date
  8. Date cell – range
  9. Date cell – disabled

Title

A title indicating the currently selected month and year.

Month navigator

Buttons allowing the user to navigate months backward and forward.

Weekday

Indicates the weekday of the dates in the column below.

Date cells

A calendar date that can be selected, mark the current date or be part of a range.

States – Calendar

The individual date elements have a set of interaction states indicating their current status.

A single date can be in its default state, selected, part of a selected range, the current date, or disabled.

Default

States – Calendar – 1

In its default state is not currently selected or the current date, and is available for selection.

Hover

States – Calendar – 2

On desktop devices a date element will respond to a hovering cursor.

Range

States – Calendar – 3

Indicates that the date is part of a selected range.

Current

Current – 1

The current date is indicated with an outline.

Selected

Selected

A selected date – either a singular date, the start or end of a range.

Disabled

Disabled

A date currently unavailable for selection.

Use consistent date formatting

Use consistent date formatting – 1
Format the displayed date according to Svenska Spel guidelines
Use consistent date formatting – 2
Don’t present the date with inconsistent or incorrect formatting.

Behaviour

Interacting with the Date Picker allows the user to enter a date manually. Clicking the calendar icon displays the Calendar, allowing the user to select a date or dates.

Single date

When the user interacts with a date the calendar closes and the Date picker displays the selected date. Interacting with the Date picker again will open the calendar with the selected date indicated.

Single date

Range selection

The range selector allows for picking multiple dates and requires interaction with a button for confirming selection.

Range selection

Modify

The date picker is available with a solid base and as an outline variant.

When using the outline variant, be mindful of the background surface to ensure accessibility is maintained.

ComponentsComposable Modal / Changelog
ComponentsDate Picker / Code

© DesignTech - AB Svenska Spel

What's newTerms of useAccessibility statementCookiesTeams channel [Internal]@svenskaspel/ui version
4.4.0

Feedback

We always want to improve the Design System and would be thrilled to get your feedback.

Please share your wisdom with us.

Microsoft Teams [internal]

Designsystem@svenskaspel.se