Skip to main content
  1. Docs
  2. Components
  3. Dates

Calendar

A month to choose a day from, on the WAI-ARIA date grid. Dates are "YYYY-MM-DD", with no library.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<table role="grid">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Choosing a day where the month is worth seeing: a review, a booking, leave.
  • A date always in view, beside what it's for.
Not for

02

Anatomy

  1. 1calendar-zoom<button>The month and year (calendar-title): it opens the years, a decade a page.
  2. 2calendar-next<button>The next month; calendar-previous, the last.
  3. 3calendar-weekday<th>The week, starting on the locale's first day.
  4. 4calendar-day<button>The chosen day: filled Ember.
  5. 5calendar-day<button>Today, ringed; read as "Today, …".

03

Do and don't

Rule out what can't be chosen
DoWeekends and holidays greyed, before anyone picks one.
Don'tEvery day open, and an error after the pick.
In a form, a field
DoA date among other fields: a Date picker, typed or chosen.
Don'tA whole month for one date in a form.

04

Content

  • Values are "YYYY-MM-DD" strings: no Date objects, no time zones.
  • Say why days are ruled out, beside it: "Weekdays only."
  • Leave the week's start to the locale.
Next — CalendarAPI