UI + UX Input And Data Entry standard

Date range picker

Provide labelled start and end fields tied to one calendar range surface that highlights the span, supports presets and manual entry, validates boundary order and duration, and applies or cancels the complete range deliberately.

Decision first

Choose this pattern when the problem matches

Use when

  • Users need to select a reporting, analytics, booking, scheduling, campaign, or eligibility period.
  • The included days, duration, or cross-month span need to be visible.
  • Users benefit from both common presets and custom start/end dates.
  • The product can validate and store explicit canonical start and end dates.

Avoid when

  • The task asks for only one exact date.
  • Users already know both exact dates and do not need a calendar relationship view.
  • The answer is approximate, named, or relative, such as next quarter or summer 2026.
  • Only a few fixed periods are allowed and custom dates are forbidden.
  • The implementation cannot support endpoint labels, keyboard selection, range highlighting, validation, and apply/cancel recovery.

Problem it prevents

Range tasks require users to understand two dates as one continuous span, but separate single-date controls hide included days, invalid order, presets, and whether changes have already affected the underlying data.

Pattern anatomy

What a strong implementation has to make clear

User need

The user is selecting a period for analytics, booking, scheduling, eligibility, reporting, campaign planning, or event duration.

Pattern promise

Provide labelled start and end fields tied to one calendar range surface that highlights the span, supports presets and manual entry, validates boundary order and duration, and applies or cancels the complete range deliberately.

Required state

Empty start and end fields with visible labels, date-format hints, and a calendar trigger.

Recovery path

Screen reader users hear only day numbers and cannot tell start, end, or in-range status.

Access contract

Label start and end fields separately and associate each hint and error with the correct field.

Quality bar

The difference between expert and weak execution

Strong implementation

Specific, visible, recoverable

  • An analytics report control shows Since and Until text fields, quick choices for Today and Last 7 days, a two-week calendar grid, selected August 3 start, selected August 14 end, and a filled band for days inside the range.
  • A hotel booking picker displays two adjacent months so a stay that crosses month boundaries can be selected without losing the start date.
  • A user chooses Last 7 days, sees 2026-08-08 through 2026-08-14 filled in the calendar, reviews both inputs, then applies the range.
  • A user types 2026-08-10 as start and 2026-08-05 as end, sees a specific end-before-start error, fixes only the end field, and keeps the start date.
Weak implementation

Vague, hidden, hard to recover from

  • A report filter has one field labelled Date and silently stores two dates separated by a dash with no start or end labels.
  • A calendar highlights only the first and last dates, leaving included days visually indistinguishable from unselected days.
  • A dashboard refreshes on every hovered day while the user is still deciding the end date.
  • A booking calendar lets users select a 90-day stay even though the service limit is 14 nights, then fails after payment details.
UI guidance
  • Render separate labelled start and end date fields with persistent format hints, a calendar trigger, and a shared calendar menu that shows both endpoints and the days between them.
  • Show selected start, selected end, in-range days, hover preview, disabled dates, min and max bounds, preset options, Apply, Cancel, and clear focus styling without relying on color alone.
UX guidance
  • Use a date range picker when users need to select or inspect a continuous period such as a report window, trip, event, booking, campaign, or eligibility span.
  • Keep both boundaries editable, explain invalid order or excessive duration, preserve the current range while users explore, and apply changes only after the range is complete for data-changing workflows.
Implementation contract

What the implementation must handle

States

  • Empty start and end fields with visible labels, date-format hints, and a calendar trigger.
  • Open calendar with start endpoint active and no end selected.
  • Hover or keyboard preview state showing the possible in-range days before end selection.
  • Complete selected range with start date, end date, and all included days visibly connected.

Interaction

  • Opening the picker reveals both endpoint fields, presets when available, and a calendar that keeps the current range visible.
  • The first calendar click sets or replaces the start date; the second valid click sets the end date and highlights the full range.
  • Hovering or focusing a potential end date previews the included range without committing it.
  • Typing in either endpoint field updates only that boundary and validates against the other boundary.

Accessibility

  • Label start and end fields separately and associate each hint and error with the correct field.
  • Expose selected start, selected end, in-range dates, previewed end, disabled dates, and active endpoint in text or accessible state.
  • Provide keyboard selection for both endpoints without trapping focus inside the calendar.
  • Keep manual typing available for both boundaries.

Review

  • Does the task require a continuous period, or is a single date enough?
  • Are start and end labels visible and programmatically separate?
  • Can users see every day included in the range before applying it?
  • Which presets match real user decisions, and can users still enter custom dates?
Interactive lab

Inspect the states before you copy the pattern

Select a complete date range

Set a start date, preview and select an end date, apply a preset, trigger reversed and too-long range errors, and review the canonical start/end payload.

Date range picker
Interactive demo is ready

Launch the live UI/UX lab when you want to inspect states, keyboard behavior, and common failure modes.

State To Inspect

Empty start and end fields with visible labels, date-format hints, and a calendar trigger.

Keyboard / Access

Tab reaches the start field, end field, calendar trigger, presets, calendar controls, day grid, Apply, Cancel, and following controls in a predictable order.

Avoid Generating

Using two unrelated single-date pickers that do not validate order or show included days.

Evidence trail

Source-backed claims behind this guidance

U.S. Web Design System: Date range picker

U.S. Web Design System - checked

USWDS date range picker guidance supports two labelled endpoints, manual date entry, scheduling and weekday context, min/max bounds, accessibility testing, and no auto-submission.

Carbon Design System: Date picker range variant

IBM Carbon Design System - checked

Carbon date picker guidance supports range endpoints, manual endpoint fields, selected start, days in range, end hover/focus, two-click or keyboard selection, and min/max dates.

Shopify Polaris: Date range picking pattern

Shopify Polaris - checked

Shopify Polaris date range guidance supports presets, custom endpoint fields, calendar ranges, multi-month spans, explicit Apply and Cancel, disabled dates, and invalid-date recovery.

Full agent/debug reference

Problem Context

  • The user is selecting a period for analytics, booking, scheduling, eligibility, reporting, campaign planning, or event duration.
  • The relationship between dates matters: start, end, days included, duration, weekdays, cross-month spans, or blackout dates.
  • Common ranges may be faster through presets but custom dates must remain possible.
  • The interface may update expensive search results, charts, availability, or pricing after the range changes.
  • The service must store unambiguous start and end dates and handle invalid or out-of-window values.

Selection Rules

  • Choose date range picker when the answer is a continuous start-to-end period and users need to see the included days.
  • Use a single date picker for one appointment, deadline, or booking date.
  • Use date input when users already know both dates and calendar adjacency does not affect the answer.
  • Use filter panel when the range is one draft criterion among multiple grouped filters that should be applied together.
  • Use select or segmented choices for a small set of fixed periods such as Today, This month, or Fiscal Q3 when custom dates are not allowed.
  • Keep start and end labels visible and editable instead of hiding both boundaries inside one compound value.
  • Show the range band between endpoints so users can verify inclusivity.
  • Use Apply and Cancel when selecting the range changes charts, tables, pricing, availability, or other expensive results.
  • Validate end date after start date, minimum date, maximum date, blocked dates, and maximum duration before committing.
  • Preserve one valid boundary when the other boundary is invalid.

Required States

  • Empty start and end fields with visible labels, date-format hints, and a calendar trigger.
  • Open calendar with start endpoint active and no end selected.
  • Hover or keyboard preview state showing the possible in-range days before end selection.
  • Complete selected range with start date, end date, and all included days visibly connected.
  • Preset range selected state synchronized to both endpoint fields and the calendar band.
  • Manual endpoint typed state that updates the same range model as calendar selection.
  • Invalid order error when end date is before start date.
  • Too-long duration error when the span exceeds the service limit.
  • Out-of-window or disabled-date state for blocked dates.
  • Dirty unapplied state with Apply and Cancel actions.
  • Applied state showing canonical start and end dates.

Interaction Contract

  • Opening the picker reveals both endpoint fields, presets when available, and a calendar that keeps the current range visible.
  • The first calendar click sets or replaces the start date; the second valid click sets the end date and highlights the full range.
  • Hovering or focusing a potential end date previews the included range without committing it.
  • Typing in either endpoint field updates only that boundary and validates against the other boundary.
  • Preset selection writes both endpoint fields and highlights the matching calendar range before Apply.
  • Apply commits the complete valid range; Cancel restores the previously applied range.
  • Submitting validates required endpoints, date format, real dates, start-before-end order, blocked dates, service bounds, and maximum span.
  • Errors name the failing boundary and keep the other boundary visible for correction.

Implementation Checklist

  • Define the range purpose, inclusive or exclusive end semantics, default range, preset ranges, min and max dates, disabled dates, maximum duration, display format, and canonical storage format.
  • Build two labelled inputs, persistent hints, calendar trigger, preset list, calendar month heading, weekday headings, start state, end state, in-range state, preview state, and Apply and Cancel controls.
  • Store range state as explicit start and end values rather than parsing a display string.
  • Synchronize typed endpoints, preset choices, calendar clicks, hover previews, dirty state, and applied state.
  • Validate date format, impossible dates, start after end, same-day ranges, minimum date, maximum date, disabled dates, and maximum span on client and server.
  • Announce active endpoint, selected start, selected end, in-range dates, disabled reasons, month changes, and validation errors to assistive technology.
  • Test keyboard selection of both endpoints, screen readers, zoom, forced colors, mobile layout, cross-month ranges, presets, cancel recovery, server-returned errors, and timezone boundaries.

Common Generated-UI Mistakes

  • Using two unrelated single-date pickers that do not validate order or show included days.
  • Collapsing the range into one unlabeled field with ambiguous dash-separated dates.
  • Refreshing analytics results before the user applies a complete range.
  • Hiding custom range entry behind presets only.
  • Clearing the valid start date when the end date fails validation.
  • Accepting an end date before the start date.
  • Failing to show whether endpoints are inclusive.
  • Using a range picker for approximate periods that users express in words.

Critique Questions

  • Does the task require a continuous period, or is a single date enough?
  • Are start and end labels visible and programmatically separate?
  • Can users see every day included in the range before applying it?
  • Which presets match real user decisions, and can users still enter custom dates?
  • When should results update: on hover, on endpoint selection, or only after Apply?
  • What happens when the end date is before the start date, blocked, or too far away?
Accessibility
  • Label start and end fields separately and associate each hint and error with the correct field.
  • Expose selected start, selected end, in-range dates, previewed end, disabled dates, and active endpoint in text or accessible state.
  • Provide keyboard selection for both endpoints without trapping focus inside the calendar.
  • Keep manual typing available for both boundaries.
  • Announce month changes, preset selection, validation errors, and applied range summaries.
  • Do not auto-submit or refresh results while users are only focusing, hovering, or exploring dates.
  • Do not use color alone to identify the range band, endpoints, or disabled dates.
Keyboard Behavior
  • Tab reaches the start field, end field, calendar trigger, presets, calendar controls, day grid, Apply, Cancel, and following controls in a predictable order.
  • Enter or Space opens the calendar from the trigger and selects the focused date for the active boundary.
  • Arrow keys move through days and weeks while preserving the active start or end boundary.
  • Page Up and Page Down move by month; Home and End move to week edges.
  • After selecting a start date, focus or active selection moves toward end-date selection without closing the picker.
  • Escape or Cancel restores the previously applied range and returns focus to the trigger.
  • Apply commits the valid range and moves focus to a summary, field, or next logical control.
Variants
  • Analytics date range
  • Booking date range
  • Campaign period picker
  • Eligibility period picker
  • Date range picker with presets
  • Date range picker with two-month calendar
  • Date range picker with typed endpoints
  • Date range picker with maximum duration
  • Date range picker with disabled dates
  • Date range picker with explicit Apply and Cancel

Verification

Last verified: