Communitygithub.com

coastdigitalgroup/coastai-skills

Design a systematic framework for date and time selection, managing calendar grids, range pickers, and scheduling interfaces to ensure precision and accessibility.

What is coastai-skills?

coastai-skills is a Claude Code agent skill that design a systematic framework for date and time selection, managing calendar grids, range pickers, and scheduling interfaces to ensure precision and accessibility.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coastdigitalgroup/coastai-skills/tree/HEAD/website-design/calendar-and-date-system

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Calendar and Date Selection System

Purpose

The Calendar and Date Selection System provides a methodology for designing interfaces that allow users to select single dates, date ranges, or specific time slots. Selecting dates is a high-friction task that involves complex mental models (e.g., "next Tuesday," "the last weekend of the month"). This system ensures that date pickers are visually clear, easy to navigate via keyboard and touch, and provide immediate feedback on validity and availability.

Use Cases

  • Booking & Reservations: Selecting check-in/check-out dates for hotels or flight departures.
  • Scheduling: Choosing a time slot for a meeting, appointment, or delivery.
  • Analytics & Reporting: Defining a custom date range (Start Date to End Date) for data filtering.
  • Birthdate Entry: Capturing date-of-birth for age verification or profile setup.
  • Event Planning: Managing deadlines or milestones in a project management tool.

When NOT to Use

  • Simple Dates: If you only need a single, well-known date (like "Today" or "Yesterday"), use a simple button or link.
  • Memorable Dates: For dates users know by heart (like Birthdays or Credit Card Expiry), use standard text inputs with type="number" or type="tel" rather than a calendar grid, as they are faster to type than to navigate on a grid.
  • Relative Time: If the user only needs to select "Last 7 days" or "This Month," use a dropdown or button group instead of a full calendar.

Inputs

  1. Selection Mode: Single Date, Date Range, or Time Slot.
  2. Constraints: Minimum/Maximum dates, disabled dates (e.g., past dates, fully booked slots).
  3. Context: Is it a standalone page element or a popover/modal trigger?
  4. Localization: Regional date formats (MM/DD/YYYY vs DD/MM/YYYY) and first day of the week (Sunday vs Monday).

Outputs

  1. Grid Anatomy Spec: Visual definition of the month header, weekday labels, and day cells.
  2. State Matrix: Visual treatments for Today, Selected, Range-Start, Range-End, In-Range, Hover, and Disabled states.
  3. Input Connection Spec: How the calendar relates to the text input field (trigger icon, formatting, and manual entry support).
  4. Accessibility Plan: Keyboard shortcuts (Arrows, Enter, Escape) and ARIA live regions for status updates.

Workflow

1. Select the Input Pattern

Choose how the user enters the date:

  • Direct Entry: Masked text input. Best for fast, known-date entry.
  • Picker Trigger: An input with a calendar icon that opens an overlay. Standard for most use cases.
  • Inline/Persistent: The calendar is always visible on the page. Best for scheduling-heavy tasks.

2. Design the Calendar Grid

Establish a consistent spatial rhythm for the month view:

  • Header: Month and Year with "Previous" and "Next" navigation buttons.
  • Weekday Row: Single-letter or short labels (S, M, T...) for quick orientation.
  • The 7-Column Grid: Ensure each day cell has enough room for the date and potential status indicators (e.g., a dot for an event).

3. Define the Range Logic (If Applicable)

When selecting a range, the interface must track three states:

  • Start Selection: The first date clicked.
  • The "Span": The visual connection between the start and the current hover position.
  • End Selection: The second date clicked, finalizing the range.
  • Visual Feedback: Use a subtle background fill for "In-Range" dates, with distinct shapes or higher contrast for the "Start" and "End" caps.

4. Design for Accessibility

  • Keyboard Navigation: Users must be able to move between days using Arrow keys, switch months with PageUp/PageDown, and select with Enter.
  • Focus Management: When the picker opens, focus should move to the currently selected date or "Today."
  • ARIA Roles: Use role="grid" for the calendar, role="columnheader" for weekdays, and role="gridcell" for days. Use aria-selected="true" for the active selection.

5. Plan Responsive Adaptations

  • Mobile View: On small screens, a single-month view is often best. For range picking, consider stacking two months vertically or using a full-screen overlay.
  • Touch Targets: Ensure each day cell is at least 44x44px or provide adequate padding to prevent accidental clicks.

Decision Rules

  • The "Type First" Rule: Always allow users to type the date manually into the input field. Do not force them to use the calendar.
  • Month Limits: If selecting a date far in the past or future (e.g., 5+ years), provide a Year/Month dropdown selector instead of forcing the user to click "Next" dozens of times.
  • Immediate Feedback: If a user selects an invalid date (e.g., a Sunday for a weekday-only delivery), show a contextual error message immediately rather than waiting for form submission.
  • Start of Week: Default to the user's locale (usually Sunday in US, Monday in UK/EU).

Constraints

  • Accessibility: Must meet WCAG AA contrast (4.5:1) for all date states. Selected dates must be distinguishable by more than just color (e.g., a solid background vs. no background).
  • Responsiveness: Calendars must never overflow the viewport. Popover pickers should use "flip" logic to stay visible if there's no room below the input.
  • Localization: Support different date formats and translations for month and day names.

Common Failure Patterns

  • The "Infinite Clicker": Making users click through 12 months to find a date instead of providing a year selector.
  • Hidden Input: Preventing users from typing the date, which frustrates power users and users with motor impairments.
  • Tiny Targets: Designing a grid with 20px cells that is impossible to use on a mobile device.
  • Lack of "Today" Context: Failing to highlight the current date, making it harder for users to orient themselves.
  • Confusing Ranges: Not clearly distinguishing between the "Start" and "End" of a range, or failing to show the "In-Range" span.

Validation Criteria

  • Users can navigate the calendar and select a date using only the keyboard.
  • Manual text entry is supported and validated in the input field.
  • Today's date is visually distinct but doesn't compete with the selection.
  • Range selections have a clear "Start," "End," and "Span" visual treatment.
  • Touch targets for day cells meet the 44x44px recommendation (or 24x24px minimum with spacing).
  • Contrast ratios for all states (Hover, Selected, Disabled) meet WCAG AA.
  • The calendar adapts its layout (or moves to full-screen) on mobile devices.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for progressive disclosure using accordions, ensuring structural integrity, visual affordances, and accessibility across different content densities and devices.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for long-form content, managing readability, vertical rhythm, and information density to ensure a superior reading experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for informational elements that communicate state (Badges) and categorization (Tags) with clarity and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for non-overlay notifications, managing global announcements and contextual inline alerts to communicate system states without interrupting the user's flow.

coastdigitalgroup/coastai-skills

Design and implement a systematic, asymmetrical bento-grid layout framework to organize diverse content types cohesively while maintaining strict visual hierarchy, logical focus order, and responsive flexibility.

coastdigitalgroup/coastai-skills

Design a responsive, mobile-first bottom navigation bar and persistent action dock system for mobile websites and web applications, establishing spatial anchors, tab bar anatomy, badge indicators, thumb-zone ergonomics, safe area inset handling, active/inactive state contrast, and desktop responsive adaptation rules.

coastdigitalgroup/coastai-skills

Design a mobile-first bottom sheet overlay system with configurable detents, drag affordances, safe area padding, responsive desktop modal/popover adaptation, and WCAG AA accessibility compliance.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for secondary navigation trails that provide orientation, context, and one-click access to parent levels in deep information architectures.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for buttons and interactive triggers, managing visual hierarchy, variant logic, and action grouping to ensure clear intent and accessible interaction.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for modular content containers that maintain hierarchy, structural integrity, and action alignment across variable content and responsive viewports.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for horizontal discovery components, managing navigation affordances, scroll behavior, and accessibility to ensure effective content density without compromising usability.

coastdigitalgroup/coastai-skills

Design a systematic, highly accessible, and developer-friendly UI layout framework for code blocks, snippet showcases, multi-file code tabs, line-highlighting, diff views, and syntax token contrast in technical documentation and developer platforms.

coastdigitalgroup/coastai-skills

Design a systematic framework for global command menus (Cmd+K panels) that combines keyboard-driven navigation, command execution, and shortcut discovery into an accessible, responsive overlay.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for threaded conversations, managing nesting depths, action hierarchies, and community signaling to foster engagement and readability.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for side-by-side comparison interfaces, managing high attribute density and responsive complexity to support informed decision-making.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for user privacy, managing consent banners, preference centers, and persistent privacy controls to balance legal compliance with user trust.

coastdigitalgroup/coastai-skills

Design and implement a systematic, highly accessible, and responsive visual layout framework for conversational chat widgets, live chat boxes, and chatbot panels that ensures clear message scannability, native focus flow, and seamless mobile keyboard adaptation.

coastdigitalgroup/coastai-skills

Design a systematic, accessible, and high-conversion framework for custom select dropdowns and comboboxes, defining anatomy, states, search-filtering, and responsive mobile-adaptive patterns.

coastdigitalgroup/coastai-skills

Design and specify a systematic dark theme framework, establishing rules for elevation-based surface colors, desaturated brand accents, text legibility, and media adaptation to ensure an accessible, low-fatigue experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic color palette that ensures WCAG 2.2 accessibility compliance. Trigger this skill when asked to define brand colors, create UI themes, or establish a visual system for a website.

Related Skills