Skip to content

BbCalendar

An always-visible calendar for a day, range, set of days, month, year, or date and time.

import { BbCalendar } from 'bitboss-ui';

On this page

Use it for

Use BbCalendar when the calendar is the interface: a booking step, a dashboard's date panel, or a filter sheet where a second sheet would be one too many.

Use something else when

  • BbDatePickerInput: people type the date, or it is a labelled field with validation messages
  • BbDatePicker: the calendar opens from a cell, chip, or button you own and closes after the pick
  • BbTimePicker: the value is a time with no date

BbCalendar is the grid that BbDatePicker opens in its popover, rendered in place. It takes the same value shapes and the same min, max, and selectable rules; the value contract is explained on the picker's page.

Passthrough

Hover or tap a part to outline it. The toggles turn on loading, errors and warnings where the component has them; only parts get a row.

2026
Mon, September 21
S
M
T
W
T
F
S

A booking step

Bind the day with v-model and add floating so the value is a plain YYYY-MM-DD with no time or zone. Name the grid with aria-label, so a page with two calendars reads "Delivery date" and "Stay" rather than two unnamed grids. Every pick updates the value, and nothing opens or closes. Clicking the picked day again keeps it; add clearable when that click should clear it.

Delivery date

Arrives Tuesday, September 1

2026
Tue, September 1
S
M
T
W
T
F
S

min and max set the window; selectable refuses individual days, here the weekends. disabled turns off the whole grid, as the collect switch does. The calendar is one Tab stop: arrows move by day and week, PageUp and PageDown by month.

An empty calendar opens on today's month, or on the nearest month inside min and max. Today is the browser's date, marked once the page has hydrated. Pass today ('2026-08-30') to fix it for a demo, a screenshot test or a business date: it is then marked on the server too and never moves at midnight. Set it for the whole app with components: { all: { today: '2026-08-30' } }.

To save a pick, listen to value-commit: it fires once per pick, and for a range once both ends are set (how it works).

Ranges and sets of days

Add range for a stay or any continuous window. The model is [start, end], [] when empty. readonly keeps a confirmed booking on screen and ignores clicks; people can still page through the months.

Your stay

Fri, Oct 9 to Mon, Oct 12, €384

2026
Mon, October 12
S
M
T
W
T
F
S

Use multiple for days that do not touch. Each pick adds or removes one day, and the array stays sorted.

Weekends on call

3 days in the rota

2026
Sat, September 19
S
M
T
W
T
F
S
  • 2026-09-05
  • 2026-09-06
  • 2026-09-19

multiple throws with range or with type="datetime". When a range crosses the month line, show both months with :number-of-months="2".

2026-09-28 to 2026-10-03

2026
Sat, October 3
S
M
T
W
T
F
S
October 2026
S
M
T
W
T
F
S

The arrows page all the months at once, and the keyboard walks from one month into the next. Too narrow for them all, the months wrap onto the next row.

In a range, Shift+Arrow extends from the cursor and Enter picks the other end. Escape with one end picked puts the previous range back.

Pick a week

Set type="week" and any day picks its whole row. The value is the ISO week, 2026-W37, with no day or zone.

Next sprint

2026-W37 to 2026-W38, 2 weeks

2026
Mon, September 14
Week
M
T
W
T
F
S
S
36
37
38
39
40

range gives a pair of weeks and multiple a sorted list. min and max take a week or a date, and a week is selectable only when all seven days fit. The grid always starts on Monday, and pt:week and pt:week-number restyle the row and its number.

Months, years, and times

Set type="month" or type="year" to swap the day grid for months or years. The values are plain labels (2026-08, 2026), and min and max take the same shape.

Revenue report

Jun to Aug 2026

2026
2026
Selecting year
2026
August 2026
Selecting month

type="datetime" adds a time rail beside the days. With floating, bind v-model:time: it is the only place the time is kept. step sets the minutes between entries. When the calendar's own box is narrower than the grid and the rail together, such as a phone column, the rail moves under the grid and the cells keep their size.

Book a consultation

Tue, Sep 15 at 14:30

2026
Tue, September 15
S
M
T
W
T
F
S

Give min or max a time, as in 2026-09-15T13:00, and on that day the time column disables the times outside it. Without floating the time is part of the value itself. ampm changes only the display, and seconds adds a seconds column.

Marking days

Use the day:append slot to put a dot or a short label under days that come from your data. For one fixed date, name the slot after it: #2026-09-07:append.

Meeting room, 2nd floor

Tue, Sep 15: Supplier call

2026
Tue, September 15
S
M
T
W
T
F
S
Holiday
Closed

A date's own slot wins over day:append on that day. Every week takes the height of the tallest one, so the month stays even. #day and #2026-09-07 replace the day number instead. Keep it to dots and short badges: BbCalendar is not an event calendar.

Every day slot receives item (the YYYY-MM-DD), today, disabled and the selection state. A screen reader reads the full date, then your #day text, then the #day:append text as the day's description, so mark a bare dot aria-hidden.

When the marks come from the server, bind v-model:month. It holds the first day of the month on screen ('2026-09-01'), and paging writes the new one, so a watcher can load that month. Write any day of a month, or YYYY-MM, to show it.

vue
<BbCalendar v-model="day" v-model:month="month" aria-label="Room bookings" floating />

Next to fields and in forms

In a filter sheet, put the calendar under two BbDatePickerInput fields with disable-panel and share one range between them, so no second sheet opens over the first.

Events

Sep 7 to Sep 11

BbCalendar does not join a BbForm by itself, so its value is not submitted. Bind it with useBbFormField and render the message next to it.

Size and styling

Set --cell on pt:root to resize the whole grid, and restyle the day marks on pt:day-button, with a state such as :selected or :today when needed.

2026
Mon, September 7
S
M
T
W
T
F
S
Default, 28px cells
2026
Mon, September 7
S
M
T
W
T
F
S
36px cells, round marks, a ringed selection, weeks from Sunday

A background on pt:day paints the whole cell square, not the mark inside it. On a phone layout, raise --cell yourself (for example pt:root="max-sm:[--cell:40px]"). The picker's bottom sheet enlarges its days; a calendar in the page does not. BbDatePicker and BbDatePickerInput forward the same parts to the calendar they open.

first-day-of-week runs from 0 (Sunday) to 6 and defaults to the locale's week start (Monday in it, Sunday in en).

The grid also follows the locale's calendar and digits: Persian under fa, Hijri with ar-u-ca-islamic-umalqura, Hebrew with he-u-ca-hebrew, an era in the heading with ja-u-ca-japanese. Write the suffix where you set the locale. The value stays an ISO Gregorian string in every calendar.