Date Picker

Last Updated 22-Mar-2004

General Description

The Date Picker allows a user to select a date from a graphical calendar to populate a date field on a page.

Guideline Contents

Guideline Attributes

Spec Version # - 3.1
Spec Contributors - Betsy Beier, Ivy Leung, Lisa Rinderknecht, Craig Louis
UI Models - all models
Example Products - all products
Related Guidelines - Tables, Buttons (Action/Navigation), Inline Messaging Tips, Hints, and Bubble Text, Locator Element: Record and Page Navigation.

General Principles

Overview

The primary Date Picker function is to provide an alternate graphical method that users may use to populate a date field. A secondary benefit of using a Date Picker is that is allows for the visible restriction of available dates for selection to those valid in the application context. Whether the Date Picker appears inline or in a secondary window, the date field is the primary interaction method. The Date Picker exists to populate the date field, and users may instead choose to manually populate the date field.

Inline or Secondary Window

The Date Picker can be displayed either in a primary window inline with the page contents, or in a modal secondary window.
Note: The secondary window must be modal to ensure that the window retains focus and does not get hidden behind the primary window.

The inline and secondary window methods offer the following advantages:

Date Field in Page Contents

Whether the Date Picker appears inline on the page, or in a modal secondary window, the Date Field is the primary item of user focus - the Date Picker exists to help them populate the Date Field.

Date Field Hint

The Hint text below the date field helps the user to enter in the correct value for the date in case they choose to do so manually. See Inline Messaging and Tips Guideline for more information regarding Hints.

Icon Access to Secondary Window

The following image shows a date field with a Date Picker Icon (calendar icon) located to the right of the field. When the calendar icon is selected, the Date Picker widget is invoked.

Date Field in Page Contents to Access Date Picker in Secondary Window
Date Field in Page Contents to Access Date Picker in Secondary Window

Date Picker Inline

This method is best used when maintaining continuous view of the calendar helps the user complete their task.

The following is an image of the a single date field among other components with the Date Picker Calendar inline in the page contents.

Date Field in Page Contents with Date Picker Inline in Primary Window
Date Field in Page Contents with Date Picker Inline in Primary Window

One-to-One / One-to-Many

One-to-One Inline Date Picker Behavior

When one Date Picker appears for each date field on the page:

One-to-Many Inline Date Picker Behavior

When only one Date Picker appears for multiple date fields, which date field gets changed when the user selects a date in the inline date picker?

For example, for the following arrangement of text and date fields:

 Field OrderType
 1Field
 2Date Field
 3Field
 4Date Field
 5Field

Stacking Multiple Months

Multiple months can be stacked if a multiple month view is necessary for the user to pick an appropriate date and complete a task.

Stacking Multiple Date Picker Calendars Inline in Primary Window
Stacking Multiple Date Picker Calendars Inline in Primary Window

Restricting Date Selection

Month & Year - Read-Only or Pulldown

The Date Picker in the secondary window either displays the month and year as read only text, or the month and year in individual pulldown lists, [Month] in first pulldown list, [Year] in next pulldown list.

  Date Picker in Secondary Window
(Read-Only Month/Year)

Date Picker in Secondary Window (Read-Only Month/Year)
  Date Picker in Secondary Window
(Pulldown Month/Year)

Date Picker in Secondary Window (Pulldown Month/Year)

To determine which option is appropriate, evaluate the task at hand, and assess the date range the user must be able to select from to fill in the field appropriately. If the range spans many years, the pulldown option is a better solution, if the range is within a year or two, the read only option is fine. The chosen option need not be consistent throughout a product family nor even within the product itself, but consistency within a product is preferable. More important, though, is that the option selected is best suited for the task at hand.

Limiting to Valid Dates

The Date Picker facilitates limitation of selectable dates to those which are valid. Invalid months and years can be set to not appear in the pulldown menu. Invalid days can be set to appear as inactive in the calendar.

If minimum and/or maximum values are set, hint text should be shown under the date field on the primary page indicating the restriction.

Here are examples of limiting the available day selections. In the left image, 15 September 2000 is the earliest valid date. In the right image, 14 October 2000 is the latest valid date. Other days appear, but are not selectable.

  Earliest Valid Day: 15 Sep 2000
Date Picker - Earliest Valid Selection 15 Sep 2000
  Latest Valid Day: 14 Oct 2000
Date Picker - Latest Valid Selection 14 Oct 2000

Here are examples of limiting the available month selections. In the left image, all twelve months are valid, and selectable. In the right image, September and August 2000 are the only valid months.

  All Months Valid
Date Picker - 12 Months Valid
 

September and August Valid
Date Picker - September and August Valid

Displaying Large Date Spans

The Date Picker Month and Year pulldown menus handle large date spans by limiting the maximum menu population visible at one time to 30 items. The items are comprised of 28 years or months, with two additional places devoted to "Before [Year/Month]" and "After [Year/Month]". That makes a total of 30 items maximum shown in each batch of displayed years or months. Similar interactions can be found in the Table Record Navigation with Large Data Sets section of the Locator Element: Record and Page Navigation Guideline.

Here's an example of a large selection of available years is handled:

Date Picker in Secondary Window - Large Date Spans
Date Picker - Large Date Spans

Date Picker Flows

The following image describes the flow and positioning of the Date Picker launched in a secondary browser window.

Date Picker in Secondary Window Flow
Date Picker in Secondary Window Flow

Visual Specifications

General Visual Principles

Measurements of Date Picker in Secondary Window
Measurements of Date Picker in Secondary Window

Open/Closed Issues