AddThisFeature

Date Range Picker

Let users pick a valid date window without guessing which end comes first.

involved Forms & Input

What it adds

A range picker with typed entry, clear boundary semantics, and no timezone drift between what was picked and what was stored.

What your agent is told to do

5
  1. 1

    Support both calendar clicking and typed entry. Keyboard users should never be forced through a grid to enter two dates they already know.

  2. 2

    Decide and document whether the range is inclusive or exclusive at each end, and make the summary text say it in words.

  3. 3

    Handle reversed selection gracefully: picking the later date first should swap the endpoints, not reject the input.

  4. 4

    Treat a calendar date as a calendar date. Store and compare it without a time component, or you will ship the off-by-one-day bug where a user in UTC-8 picks the 1st and the server records the 31st.

  5. 5

    Do NOT reimplement locale formatting by hand. Use the platform's locale data for month names, date order, and first day of the week.

Edge cases it handles

6
  • First day of week and date order differ by locale — read them from the locale, do not hardcode Sunday or MM/DD.
  • Disabled dates inside a range must be enforced, not just greyed out.
  • Minimum and maximum span limits must be explained when they block a selection.
  • Open-ended ranges need explicit support and a clear label, not a blank endpoint.
  • On mobile the calendar must fit without horizontal scroll and should not fight the native keyboard during typed entry.
  • Presets like 'last 30 days' must state their boundary rule — whether today counts.

Definition of done

8
  • A range can be entered fully by keyboard and fully by pointer.
  • Inclusive or exclusive boundaries are documented and reflected in the displayed summary.
  • Selecting the end before the start produces a valid range.
  • The stored range matches the dates the user saw, in every time zone.
  • Locale determines date format and first day of week.
  • Disabled dates and span limits are enforced with an explanation.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.