Date & Time

Problem Summary: Enter a date and/or time
Pattern Key: DATE
Example:

Use When: To enter a date
Solution: The behavior of the ASI date and time controls are the same as Telerik's Date Picker and Time Picker.
  1. A year or month that is not applicable should not be displayed.  For example, when scheduling an event, the event should be in the future, so a year before the current year should not be shown and a month before the current month should not be shown.  Similarly, for birthdays, years and months that are entirely in the future should not be shown.
  2. Date and Time Pickers may be used together if both a date and a time are needed.
  3. Note that the calendar icon that drops the calendar down highlights when the cursor hovers over it.  Compare "Date Picker" with "Dropped Down" in the example above.

Ranges

  1. If a range of dates is needed, two date controls are used.  They behave exactly described above, but in addition the second date cannot be before the first one.
Rationale: No comment
Accessibility: See Accessibility
  • Note that dates and times may also be entered into the text box and the Telerik RadControls support keystrokes for moving around in the drop-down calendar.
Internationalization: See also Internationalization
  • Different date conventions are supported.  The date format is determined by a locale setting for each iMIS website.
Supporting Examples: www.peterblum.com/datecontrols
Where Used: Many places
Coding: ASI SmartControl, which uses Telerik RadCalendar and related controls.

Items of Note: None

Put to Use

Status: Review

Used in Conjunction with: None

Related Patterns:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Please support YYYYMMDD

This format is very popular for a variety of reasons.

  • Date format is unambiguous without delimiters

  • MSSQL supports this format regardless of i18n settings
  • When used in output, sorting alpha or numerically = sorting by date (admittedly a side issue for data entry issues, but output is often used later for input)
  • Can be stored using some numeric formats
  • Heads-down data-entry people are people too :)

    -- Bruce

Thanks so much for the input

In all likelihood, we will.

Comments from review meeting

Recorded here so they don't get lost.

  • Look at Peter Blum date control and i10.
  • iMIS used to have (and may still have) conventions for rapid entery, such as T for today and M for "add one to the month."
    • How to we internationalize these?
  • Plan to implement ourselves

Two comments

1. Regarding internationalization - I don't think the culture settings should be set at the iMIS installation level, but rather at the website level. Or maybe have a default at the iMIS level but overridable per website in CM. The reason is that an organization might want to run say a US and a AUS site and will want different date formats for the public components.

However, I do think, as I have argued elsewhere, that the format should be per site rather than based on the user's browser settings.

2. I think we need a slightly different pattern for when just like Month and Day or Month and Year are required (e.g., for credit card expiry, terms, etc.). In that case one typically sees two drop downs. Not sure if this should be here or a separate pattern.

Does our current control do all this?

I like this functionality. I think it is very clean and could be very light-weight. My only question is does our existing control do all of this now? If so, great.

If not, we should look at Telerik's rad calendar (which does a whole lot more) and make this pattern match it. We really don't want to do a lot of development on our own control if an existing one does what we want.

Why Telerik

At the pattern review with dev, someone asked why we should not use our existing control. The answer is that it does not support selecting a date using keystrokes.