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.

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. On a prerendered page it opens on the build date's month and moves to the reader's month after hydration, so seed a value when the opening month matters.

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".

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.

Next to fields and in forms

In a filter sheet, put the calendar under two BbDatePickerInput fields with disable-calendar 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).