Skip to main content
Copy for LLM

Calendar

The <x-wirekit::calendar> component renders a standalone month grid for single-date selection. It supports full keyboard navigation (arrow keys, Page Up/Down, Home/End) and integrates with forms via a hidden input. Its grid follows the keyboard model of the WAI-ARIA date picker dialog example, without the dialog around it.

Usage

Calendar
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3

Multi-month & quick navigation

Render several months side by side with months, or swap the static month label for native month + year jump selects with selectable-header, drawn as pills on the muted surface. Both are opt-in.

Quick month / year navigation
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
Two months side by side
April 2026
April 2026
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
May 2026
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
27 28 29 30 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

In a multi-month view the day grids stay fully keyboard-navigable: arrow keys cross between the displayed grids before shifting the whole window.

Each month is named once. With several grids in view each grid names its own month and the header holds the arrows; when a picker's dialog shows one grid on a phone, the header names that month. A screen reader hears the change of month either way, and each grid keeps its month as its name.

Date range

Add the range flag and the calendar takes two clicks: the first sets the start, the second the end. A second click before the start simply becomes the start — there is no rule to learn about which end to pick first. While only the start is set, the day under the pointer stands in for the end, so the shading answers the question a reader is actually asking: what am I about to choose.

The two ends are filled, and the days between them sit on one continuous band, square where it meets an end and running through the row without a gap. While the pointer previews an end, the band reaches the day under it, and that day carries a stronger tint than the band, so it reads as the end about to be chosen rather than as a choice already made. A range of one day draws no band.

value reads and writes YYYY-MM-DD/YYYY-MM-DD, the same spelling date-picker uses with its own range flag — a value moves between the two without translation. The form receives the two ends as name[start] and name[end], the same two fields a range date-picker sends, and wire:model receives the combined value. There is no combined name field beside them: PHP keeps only one of a string and an array sent under the same name, so a handler could never read both.

Date range over two months
August 2026
August 2026
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6
September 2026
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 1 2 3 4

Binding a range

A Livewire property typed with Pushery\WireKit\Values\DateRange binds the range itself: it stays a range when the calendar sends one, rather than turning into text.

use App\Models\User;
use Livewire\Component;
use Pushery\WireKit\Values\DateRange;

class SignupReport extends Component
{
    public DateRange $period;

    public int $signups = 0;

    public function mount(): void
    {
        $this->period = DateRange::empty();
    }

    public function countSignups(): void
    {
        $this->validate([
            'period.start' => 'required|date',
            'period.end' => 'required|date|after_or_equal:period.start',
        ]);

        $this->signups = User::whereBetween('created_at', $this->period)->count();
    }
}
<x-wirekit::calendar name="period" range :value="$period" wire:model.live="period" />

A DateRange is a period of Carbon: whereBetween() reads its two ends and takes the whole of the last day, and a loop over it runs a day at a time. Validation reads the ends as period.start and period.end. While only the start is picked, hasEnd() is false and end() returns null; hasStart() says the same of the start, and isComplete() whether both ends are there. DateRange::from() reads every value the calendar takes, and a date picker with range binds the same property.

Pushery\WireKit\Values\DateTimeRange is the same range with a time of day on each end, to the minute.

Limits

min and max bound the days a reader can pick, and unavailable closes single days. A closed day stays in the grid and within reach of the keyboard, dimmed and named as unavailable, and neither a click nor Enter picks it. The arrow buttons and Page Up / Page Down do not move to a month that lies wholly outside the bounds. Without a value, a calendar whose limits close today opens on the next day that can be picked, or on the last one when every open day lies before today.

Bookable from 5 October to 20 December, two days closed
October 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
28 29 30 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1

min and max take a day (YYYY-MM-DD), a date and time such as 2026-10-05 14:30 or the ISO 8601 that Laravel writes into JSON, a date object, or today and now. Each is read as the day it falls on in the application's time zone, so min="today" closes every day before today. unavailable takes a list, or days separated by commas. A value that names no day limits nothing, and text that cannot be read as a day, in min, max or an entry of unavailable, is reported. A bound changed by a Livewire render reaches the grid without resetting it.

Range limits

With range, min-range and max-range set the fewest and the most days a range may cover, both ends counted. Once the start is picked, every day that would make the range too short or too long is closed, before the start as well as after it, and the shading previews only a range that can be made. A range may cover an unavailable day: unavailable closes the days a range can start or end on, not the days between them. Where a range must not include one, a stay for example, check it on the server.

A stay of three to eight days, the start picked
October 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
28 29 30 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1

The limits steer what a reader can pick and nothing more. Validate the value on the server as well.

Presets

presets puts a list of ranges beside a calendar with range, such as "Last 7 days" or "This month", each picked in one press. On a narrow screen the list becomes a select above the calendar. presets alone offers today, yesterday, this week, the last 7 days, this month, the year to date and, with min, all time. A list of your own names the presets and their order, as keys separated by spaces.

A report period with presets
Preset ranges
Preset ranges
November 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6
Keys Range
today, yesterday, tomorrow That day
thisWeek, lastWeek, nextWeek A week from its first day, which follows week-starts-on
last7Days, last14Days, last30Days Up to today, today counted
next7Days, next14Days, next30Days From today, today counted
thisMonth, lastMonth, nextMonth A calendar month
last3Months, last6Months From the day after the same date three or six months ago to today
next3Months, next6Months From today to the day before the same date three or six months ahead
thisQuarter, lastQuarter, nextQuarter A calendar quarter
thisYear, lastYear, nextYear A calendar year
yearToDate From 1 January to today
allTime From min to today, and left out without min
custom No range of its own: it marks a range picked in the grid that no preset names

A range picked in the grid marks the preset it equals, or "Custom" when the list holds it. A preset outside min, max or the range limits, or one that starts or ends on an unavailable day, stays in the list and cannot be picked. Today is your application's day, in its time zone, and with presets the grid marks the same day as today and the today button picks it, so the three agree for a reader in another time zone too. presets needs range, and a calendar with optimistic leaves it out.

A form receives the preset as name[preset], empty for a custom range. Bound with wire:model, the calendar sends the range as text, without the preset. A date picker with range binds the preset as a third path. DateRange::from() reads a preset from an array, and $range->preset() returns it, so a filter set to "Last 7 days" is still "Last 7 days" when it is read again tomorrow. DateRange::fromPreset($range->preset()) computes its days for today, and each preset is a static constructor as well, DateRange::last7Days().

Today button

with-today adds a button beside the arrow to the next month. Its face shows today's day of the month, and its name says the whole date, "Today, October 22", in your application's language. From another month it goes back to today's; with today's month in view it picks today.

With a today button
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3

A today that the limits close is only gone to, not picked. While today's month lies wholly outside min and max, the button closes as the arrows close.

Week numbers

week-numbers adds a column with the ISO 8601 number of each week. A week is numbered by the Thursday it holds, so a row shows the same number whichever day the week starts on, and the last days of December can belong to week 1 of the next year.

Week numbers across the turn of the year
January 2027
Week number Mon Tue Wed Thu Fri Sat Sun
Week number Monday Tuesday Wednesday Thursday Friday Saturday Sunday
53 28 29 30 31 1 2 3
1 4 5 6 7 8 9 10
2 11 12 13 14 15 16 17
3 18 19 20 21 22 23 24
4 25 26 27 28 29 30 31

The column shows # at the top and is named "Week number" for a screen reader. Each number is the header of its row, so a reader moving through the days hears the week with them.

Fixed weeks

A month spans four to six rows, so a calendar changes its height as you page through the year. fixed-weeks draws six rows in every month and fills them with the days of the next one, so a calendar in a popover or beside other content keeps its height.

Six rows in every month
February 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

Opening month

Without a value the calendar opens on the current month, with the keyboard on today, or on the next day that can be picked when the limits close today. open-to names another month: a day, a month written as YYYY-MM, or a date object. A value always wins, and the calendar opens on the month of the chosen date.

Opens on November 2026 without a value
November 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6

When a form reset or a Livewire render clears the value, the grid goes back to the month open-to names.

The grid stands on the page as it loads, before the script starts and on a page that runs none: the month it opens on, its chosen day or range and the days its limits close. With selectable-header, the header names that month as text until the script fills the month and year selects. Picking a day and paging through the months take the script, and without a value the grid opens on the application's today until the script has the reader's.

Disabled and read-only

disabled locks the calendar as a disabled field is locked: no day, arrow, preset or header control can be pressed, and the form receives none of its fields. readonly shows the date and lets the reader page through the months and move between the days, but nothing picks a day or a preset, and the form still receives the value. Where both are set, disabled wins.

A read-only calendar
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
A disabled calendar
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3

Read-only, the today button goes to today's month and moves the keyboard onto today without picking it. With presets the list stays in reach and says it is read-only; on a narrow screen its native select is disabled, since a native select has no read-only state. Neither state takes part in required: an empty calendar in either does not stop the submit, as a native field in either state does not.

Sizes

size sets the size of the day cells: sm at 32px, md at 36px, the default, and lg at 48px. The day numbers grow with them. In a narrow container the days shrink with their columns at every size, never below the 24px that WCAG 2.5.8 asks of a target.

Small and large day cells
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
April 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3

Week start

Weeks begin on Monday by default. Pass week-starts-on to change it, from 0 for Sunday to 6 for Saturday, or locale for the first day of the week in your application's locale: Monday in German or French, Sunday in American English. The app-wide default lives in config/wirekit.php under components.calendar.week-starts-on, and null there follows the locale for every calendar.

Sunday-first week (week-starts-on=0)
April 2026
Sun Mon Tue Wed Thu Fri Sat
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
29 30 31 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 1 2

The first day of a locale comes from the locale data of PHP's intl extension. Without the extension, locale starts the week on Monday.

Pre-selected Date

Pass an ISO 8601 date string (YYYY-MM-DD) to the value prop. The calendar opens on that date's month with the day highlighted. A date object works too, such as a model attribute with a date cast: the calendar reads the day it names. So does a date and time written as text, such as 2026-03-15 14:30:00 or the ISO 8601 that Laravel writes into JSON, read in your application's time zone. In range mode, the two ends can also arrive as an array, ['start' => $from, 'end' => $to], each a date object or a string.

<x-wirekit::calendar name="start_date" value="2026-01-10" />

No Initial Value

Without a value, the calendar opens on the current month, or on the one open-to names, with today marked by a dot under its number (not selected). When the limits close today, it opens on the next day that can be picked.

<x-wirekit::calendar name="appointment" />

Inside a Form

The calendar renders a hidden <input> with the given name attribute (two in range mode, name[start] and name[end]). When a date is selected, the hidden input's value updates and dispatches an input event — making it compatible with standard form submission and wire:model.

<form wire:submit="save">
    <x-wirekit::field label="Start Date">
        <x-wirekit::calendar name="start_date" :value="$startDate" wire:model="startDate" />
    </x-wirekit::field>

    <x-wirekit::button type="submit">Save</x-wirekit::button>
</form>

With Livewire

The hidden input dispatches a native input event on selection, so wire:model bindings work automatically. Pass the bound property as :value as well: the calendar keeps the chosen date in its own state, seeded from value, so without it a stored date is not shown and a date the server sets does not reach the grid.

<x-wirekit::calendar name="event_date" :value="$eventDate" wire:model.live="eventDate" />

Visual States

State Visual Treatment
Today A dot under the number in the accent color, and bold weight when not selected. On a chosen day the dot takes the accent's foreground color, so it stays visible on the fill.
Selected Accent background with accent foreground text
Current month day Normal text, hover shows subtle background
Adjacent month day Muted text with reduced opacity, not clickable, and never part of a range: a range shows in the grid of its own month
Closed day Muted text at the disabled opacity, aria-disabled, not clickable, still reachable with the keyboard and named as unavailable. See Limits.
Disabled (disabled) The days, the arrows and the header controls at the disabled opacity and locked; the month and the weekdays stay readable
Read-only (readonly) Drawn as an ordinary calendar, without the hover background on the days

Keyboard

The calendar grid supports full keyboard navigation following the WAI-ARIA Grid pattern:

Key Action
Tab Move focus into the date grid
Arrow Right Move focus to the next day
Arrow Left Move focus to the previous day
Arrow Down Move focus to the same day next week
Arrow Up Move focus to the same day previous week
Page Down Move to the same day of the next month, unless the month lies wholly after max
Page Up Move to the same day of the previous month, unless the month lies wholly before min
Shift + Page Down Move to the same day of the same month next year, or as far as max allows
Shift + Page Up Move to the same day of the same month last year, or as far as min allows
Home Move focus to the first day of the month
End Move focus to the last day of the month
Enter / Space Select the focused date

When arrow keys move past the first or last day of the month, the calendar navigates to the previous or next month automatically. Page Up and Page Down keep the day's number, or land on the last day of a shorter month: from 31 January, Page Down goes to the last day of February.

The arrow keys go on from the day that has the focus, and that includes a day you clicked: after a click on the 22nd, Arrow Right moves to the 23rd.

On a right-to-left page, where the week runs from the right, Left Arrow moves to the next day and Right Arrow to the previous one.

Date Format

The calendar uses ISO 8601 (YYYY-MM-DD) format internally and in the hidden input value. Everything a reader sees or hears — the month/year header, the weekday column headers, the month names in the jump <select>, and the full date each day cell is named with — is formatted in your application's locale, the one config('app.locale') carries.

Displaying another language

Set the application locale and the calendar follows it; there is nothing to configure on the component:

// Anywhere before the view renders — middleware, a controller, a Livewire mount.
App::setLocale('de');

The header then reads "April 2026", "Dezember 2026", "März 2026", and a day cell is announced as "Mittwoch, 15. April 2026". The word for today, which no date formatter produces, comes from WireKit's own translation files.

locale writes the dates of one calendar in another locale, a BCP 47 tag such as fr or en-US, for a schedule that belongs to another region than the page. Its texts, such as the names of the month buttons, stay in your application's language, and with week-starts-on="locale" the week starts on that locale's first day:

<x-wirekit::calendar name="departure" locale="en-US" week-starts-on="locale" />

In another language than the page's, such as locale="de" on an English page, the month heading, the weekday headers and the month names carry that locale in lang, so a screen reader reads them in their own language. The full date a screen reader hears for each day stays in the page's language, as the words added to it do, such as today: a name is read in one language.

A calendar mounted by hand — a factory call outside the Blade component — receives no locale and falls back to the browser's preference rather than to English.

The hidden input always uses ISO 8601 (YYYY-MM-DD) regardless of the display locale. If your backend needs a different format (like DD.MM.YYYY), convert on the server side:

// In your Livewire component or controller
$formatted = Carbon::parse($this->startDate)->format('d.m.Y');     // 15.04.2026
$written   = Carbon::parse($this->startDate)->translatedFormat('d. F Y'); // 15. April 2026

The translatedFormat() method from Carbon respects your config('app.locale') setting, so with 'locale' => 'de' it outputs German month names automatically.

Optimistic UI

Pass the name of the Livewire method the calendar should call and the date lands immediately, then confirms or undoes itself when the server answers:

<x-wirekit::calendar
    name="due"
    :value="$due"
    optimistic="saveDue"
/>

Load wirekit-optimistic.js alongside whichever bundle you already use — below it, in your layout:

@wirekitScripts
<script src="{{ asset('vendor/wirekit/wirekit-optimistic.js') }}" defer></script>

Try it

The demo below runs the real path: the change shows immediately, the outline says it is provisional, and the server's answer either confirms it silently or takes it back.

Optimistic calendar — accept it, refuse it, watch a slow answer

Accepted

August 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

The date is kept and nothing is said.

Refused

August 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

The old date comes back, and the refusal is spoken.

Slow to answer

August 2026
Mon Tue Wed Thu Fri Sat Sun
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31 1 2 3 4 5 6

The dashed outline is the provisional state.

The <livewire:demos.…> wrapper above exists only on this site — it supplies the demo methods so the page can show a real round trip. The block under it is what you write.

The prop takes a method name rather than true because the component cannot know the action otherwise: server actions reach a WireKit component through the attribute bag, so it never sees your wire:click. optimistic replaces wire:model.live here rather than joining it — the method you name is what changes the value on the server; pass the current one with :value so the calendar knows where it started.

The displayed month does not roll back with the date. If you paged forward to March and the pick was refused, you are still looking at March — only the selection returns to what the server has. Where you are looking is yours; the value is the server's.

What a screen reader hears

Picking a date announces once, hedged — "Saving" — so the new value is audible as provisional. Confirmation is silent: what was announced is what happened. Only a deviation speaks a second time, which is what makes an undo recognizable as an undo.

Where the calendar sits in a form that already shows a validation message, the undo stays silent and leaves that message to speak: it tells you what to do, "could not save" does not.

An aborted request announces nothing at all — nothing was refused.

Focus stays exactly where you put it. An undo arrives on the server's schedule, and moving focus then would take you out of your place for a reason you could not predict.

Props

Prop Type Default Description
value string|DateTimeInterface|DatePeriod|array|null null Initial selected date in YYYY-MM-DD format, or a date object; in range mode also the two ends as an array, or a DateRange. See Binding a range.
optimistic string|null null Livewire method to call, showing the new date before the server confirms it. See Optimistic UI.
optimisticArgs array [] Extra arguments appended to the optimistic action call, after the new value — the row this control belongs to.
name string 'date' Name attribute for the hidden form input (read from $attributes). The ids of the month and year selects and of each grid's heading derive from it; a second calendar with the same name on the page, or a second without one, gets -2, so each grid is named by its own month
months int 1 Number of consecutive months to display side by side (clamped 1–4)
range bool false Two-click range selection. value reads and writes YYYY-MM-DD/YYYY-MM-DD, and the form receives name[start] and name[end] in place of name
selectableHeader bool false Replace the static month label with native month + year jump selects
required bool false Marks the date as required: the month grids carry aria-required="true". In a form, an empty required calendar stops the submit as a native required field does: the browser's own message shows under the months, in the reader's language, and the focus moves to the day the keyboard stands on when it is the first empty field. A disabled or read-only calendar does not stop it.
disabled bool false Locks every control and takes the calendar's fields out of the form. See Disabled and read-only.
readonly bool false The months and days can be read and moved between, nothing picks a day or a preset, and the form still receives the value. disabled wins where both are set.
weekStartsOn int|string 1 First day of the week, from 0 (Sunday) to 6 (Saturday), or locale for the first day in the application's locale. App-wide default in config/wirekit.php, where null follows the locale. See Week start.
withToday bool false A button beside the arrow to the next month that goes back to today's month, and picks today there. See Today button.
weekNumbers bool false A column with the ISO 8601 number of each week, counted on its Thursday
fixedWeeks bool false Six rows in every month, so the calendar keeps its height
locale string|null null BCP 47 locale for every date the calendar writes and for the first day of a week that follows the locale. null uses your application's locale; the texts stay in its language. See Date Format
openTo string|DateTimeInterface|null null The month the calendar opens on without a value: a day, YYYY-MM or a date object
size string 'md' The size of the day cells: sm, md or lg. See Sizes.
flush bool false Without the panel's frame: no border, shadow, background or padding, for a calendar on a surface of its own, as the datetime picker places it in its dialog
min string|DateTimeInterface|null null The first day a reader can pick: YYYY-MM-DD, a date and time, a date object, today or now, read as its day in the application's time zone. See Limits.
max string|DateTimeInterface|null null The last day a reader can pick, read as min is
unavailable array|string|null null Days a reader cannot pick: a list of days or date objects, or days separated by commas
minRange int|null null With range: the fewest days a range may cover, both ends counted
maxRange int|null null With range: the most days a range may cover, both ends counted
presets bool|string|array|null null With range: a list of ranges beside the calendar, true for the default list or the keys of your own, separated by spaces or as an array. See Presets.
scope string|null null Scoped personalization key

Accessibility

  • Grid: role="grid" on the <table> element
  • Cells: role="gridcell" on each <td>
  • Rows: role="row" on each <tr>
  • Day headers: <th scope="col"> for column headers, showing the short weekday ("Mon") and carrying the full one ("Monday") in abbr, both in the application's locale already in the HTML the server sends, so a page read before its script runs shows them in that language too
  • Day cells: each day button is named with its whole date — "Wednesday, April 15, 2026" — because its visible text is the number alone, and today says so
  • Grid name: each <table role="grid"> is labeled by its own month heading via aria-labelledby
  • Selected day: aria-selected="true" on the <td role="gridcell">, which is where the ARIA grid pattern allows it — putting it on the button inside fails aria-allowed-attr
  • Under forced colors, where the accent fill of a chosen day and the band of a range are not painted, a chosen day and either end of a range are framed in the system's selection color, and the days between them carry a line above and below
  • Roving tabindex: only the focused day has tabindex="0"; all others have tabindex="-1". A click moves it to the day it lands on, so a reader who tabs away and back returns to that day
  • Month label: aria-live="polite" announces month changes to screen readers, in the application's locale
  • Nav buttons: aria-label="Previous month" / aria-label="Next month"
  • Today button (with-today): named with today's date in the application's language, "Today, October 22", since its face shows only the day of the month. While today's month lies wholly outside min and max it carries aria-disabled, as the arrows do, and keeps the focus
  • Week numbers (week-numbers): the column's header shows # and is named "Week number"; each number is a <th scope="row">, so a screen reader names the week with each day it reads
  • Disabled (disabled): every button and select carries disabled, the grid aria-disabled="true", and the preset list aria-disabled="true" with no tab stop
  • Read-only (readonly): the grid and the preset list carry aria-readonly="true", and the days keep their roving tab stop, so a reader can move through them
  • Chevron SVGs: aria-hidden="true" (decorative)
  • Disabled days (adjacent months): disabled attribute prevents interaction
  • selectableHeader: native <select> controls (full keyboard + screen-reader support) with sr-only labels and an aria-live month announcement
  • Multi-month (months > 1): each month is its own role="grid"; arrow keys move between the displayed grids, keeping a single roving tabindex="0"
  • An aria-label or aria-labelledby of yours makes the calendar a group named by it, and each month keeps its own name.
  • Presets (presets): a listbox named "Preset ranges", one option per preset. The preset the range equals carries aria-selected, and one outside the limits aria-disabled. The list holds one tab stop, on the chosen preset or else the first open one; the arrow keys move between the open presets, Home and End go to the first and the last, and Enter or Space picks. On a narrow screen the list is a native <select> with the same name.

Day-cell size on touch

Day cells measure 36×36 at the default size, 32×32 at sm and 48×48 at lg, and the month navigation buttons 28×28. All of them clear the 24×24 minimum of WCAG 2.5.8. At sm and md the days stay under the 44×44 of the AAA criterion 2.5.5, a deliberate choice, not an oversight.

The reason is that the enlargement would defeat itself. At the default size the days stand 40px apart, 36px wide with 4px between them. A 44px hit area around each would reach the edge of both neighbors, the areas of two neighbors would cover the same gap, and the day painted last would take the taps there. At sm, 32px days 36px apart, the areas would reach 2px into the neighboring days. A day that is slightly small is workable; a day that activates its neighbor is not. Reaching 44 here needs a bigger calendar, which is a layout decision, so if your app needs it, use size="lg" rather than enlarging only the hit areas.

Keyboard Interaction

See Keyboard above for the full key table, the move to the next or previous month at the edges of the grid included.

Pitfalls

  • A calendar always shows its month grid. Where a date is one field among many in a form, a date picker keeps the grid in a popover until it is needed and shows the chosen date as text. The calendar suits a page where picking the date is the main task, a booking or a report period.

  • It needs 222px, and below that the last column goes over the edge. A day is 36px wide where there is room and shrinks with its column, down to 24px, the smallest target WCAG 2.5.8 allows. So the grid stops at 196px, and with the panel's 12px padding either side plus its 1px border that makes 222px the narrowest container the calendar fits inside. Where a container sizes to its content, as a flex item or a fit-content box does, the calendar takes the 306px of its full-size days at the default size, 278px at sm and 390px at lg. A column of week numbers adds the width of its numbers.

    What happens below 222px is worth knowing, because it is quiet. The grid keeps its 196px and starts overrunning the panel's padding; nothing scrolls and nothing throws. Around 210px the seventh column crosses the panel's outer edge, and in a container that does not scroll a reader simply loses Sunday.

    A phone leaves more than that even at 320px, which is also the width a desktop reader has at 400% zoom. It matters when the calendar sits in something much narrower: a sidebar or a split pane. Give it 222px or let its container scroll.

Design Tokens

Token Used for
--font-wk-sans Calendar font family
--font-wk-body-weight / --font-wk-heading-weight Day / month-title weight
--text-wk-xs / --text-wk-sm / --text-wk-md Weekday header and week numbers / day / month title. A day at sm takes --text-wk-xs, at lg --text-wk-md
--size-wk-sm / --size-wk-md-compact / --size-wk-lg Day-cell size at sm / md / lg
--size-wk-target-min The smallest a day cell shrinks to in a narrow container
--size-wk-md With presets, the height of the select that offers them on a narrow screen
--color-wk-text Day-cell text
--color-wk-text-muted Out-of-month + weekday header text
--color-wk-accent Selected day background, today's dot
--color-wk-accent-fg Selected day text, today's dot on a selected day
--color-wk-bg-elevated Calendar panel background
--color-wk-bg-hover Day and navigation-button hover background
--color-wk-border Panel border
--color-wk-border-strong / --color-wk-border-strong-hover Border of the month and year selects of selectable-header
--color-wk-bg-muted / --radius-wk-full Surface and pill shape of the month and year selects
--color-wk-ring Focus ring
--ring-wk-width Focus ring width
--border-wk-width Border width
--radius-wk-sm / --radius-wk-lg Day-cell + panel border radius
--shadow-wk-md Panel drop shadow
--padding-wk-x-md / --padding-wk-y-xs / --padding-wk-y-sm Cell + nav button padding
--transition-wk-duration Hover / selection transition

Personalization

Override classes globally via WireKit::personalize():

use Pushery\WireKit\WireKit;

WireKit::personalize('calendar', [
    // Keep `wk-calendar`. It is not decoration: a rule in `dist/wirekit.css` uses it
    // to flip the grid to `block; width: 100%` below 640px, and a base without it leaves
    // the calendar at its full-size width on a phone, 306px at the default size, narrow
    // enough to clip the trailing weekday column in a padded container.
    'base' => 'wk-calendar inline-block p-[var(--padding-wk-x-md)]'
        .' bg-[var(--color-wk-bg-elevated)]'
        .' border-[length:var(--border-wk-width)] border-[var(--color-wk-border)]'
        .' rounded-[var(--radius-wk-lg)] shadow-[var(--shadow-wk-sm)]'
        .' font-[family-name:var(--font-wk-sans)]',
    'header' => 'flex items-center justify-between mb-2',
]);

Further Reading

Updated in WireKit v2.74.0 (2026-11-24)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store