Forms

Calendar

Browse months, select a date and mark events in an inline calendar.

Open ↗
Calendar interaction recorded with the Blinc headless renderer
Hybrid · dark · native recording · 2×

Usage and properties

Browse months, select a date and mark events in an inline calendar. Apply CSS after the component layer to restyle the documented parts.

Use the installation guide to add blinc_cn and its component stylesheet. Create the fixture bindings once, and return the demo from your UI builder. Values marked Bound accept Signal/Computed sources where the API supports them; structural options configure the component at construction.

PropertyTypeUpdate modelThis example
selectedSignal<Option<CalendarDay>>Bound2026-11-04
today / week_startCalendarDay / u32Construction2026-11-04 / Monday
eventsVec<CalendarEvent>ConstructionDesign review

Keyboard and interaction

Tab to the day grid, or click a day. Arrows move by a day or a week, Page Up and Page Down by a month, Home and End to the ends of the week; Enter or Space chooses. :focus-visible marks keyboard focus.

Customizing it

Add application CSS after the default component layer. These selectors are the restyling surface for this component:

  • .cn-calendar
  • .cn-calendar-weekdays
  • .cn-calendar-weekday
  • .cn-calendar-months
  • .cn-calendar-body
  • .cn-calendar-year-picker
  • .cn-calendar-header
  • .cn-calendar-caption
  • .cn-calendar-month-picker
  • .cn-calendar-nav
  • .cn-calendar-grid
  • .cn-calendar-page
  • .cn-calendar-day
  • .cn-calendar-events
  • .cn-calendar-event
  • .cn-calendar-event--icon

Theme and component variables: --cn-calendar-selected-bg, --cn-calendar-selected-color, --primary, --text-primary, --text-secondary, --surface, --border, --radius-default, --duration-fast, --ease-state.

Built-in themes

The Live theme control installs Blinc's own theme bundles, including their colours, focus rings, corner shapes and motion tokens.

pub fn theme_bundle_for(name: &str) -> blinc_theme::ThemeBundle {
    match name {
        "restrained" => blinc_theme::RestrainedTheme::bundle(),
        "expressive" => blinc_theme::ExpressiveTheme::bundle(),
        _ => blinc_theme::HybridTheme::bundle(),
    }
    .with_css(blinc_cn::cn_styles::CN_STYLES)
}

Download the default widget and component stylesheets. Sample assets and licenses are available in the asset guide.

Documentation

From the canonical component guide.

A month of days to pick a date from, bound to a Signal<Option<CalendarDay>>:

let picked = ctx.use_signal(None::<CalendarDay>);

cn::calendar(picked)
    .week_start(1)          // Monday first; 0 (Sunday) is the default
    .min_year(2020)
    .max_year(2030)
    .on_change(|day| println!("{}-{}-{}", day.year, day.month, day.day))

CalendarDay holds a year, a month from 1 to 12 and a day. CalendarDay::today() is the local date, and add_days, add_months and weekday do the date arithmetic. The month and year selects, or the buttons either side of them, turn the month. Dragging or a two-finger swipe across the days moves the month with it; let go far enough and it turns (leftward for the next), or it springs back. Moving the pointer off the days cancels it. Scrolling up and down still moves the page; choosing a day of the month before or after turns to it. Tab to the day grid, or click a day: the arrows move by a day or a week, Page Up and Page Down by a month, Home and End to the ends of the week, and Enter or Space choose. For a compact trigger that opens this calendar in a popover, use Date Picker.

Events

.events(..) marks days with what is on them: meetings, the weather, deadlines. It takes a list, or a Signal or Computed of one, and the marks follow it in place. Up to three show along the bottom of a day, each a dot or, with .icon(..), the event's icon:

let events = ctx.use_signal(vec![
    CalendarEvent::new(CalendarDay::new(2026, 11, 3), "Standup").kind("meeting"),
    CalendarEvent::new(CalendarDay::new(2026, 11, 4), "Rain")
        .kind("rain")
        .icon(to_svg(icons::CLOUD_RAIN, 8.0)),
]);

cn::calendar(picked).events(events)

events_on(&events, day) lists what is on a day, for showing beside the calendar.

Styling

The parts are .cn-calendar, -header, -caption, -nav (with data-step="prev" or "next"), -body, -weekdays, -weekday, -months, -page, -grid and -day. A day carries data-outside, data-today, data-selected, data-events, data-focus-visible while the keys are on it, and disabled outside the allowed years. A turning month's grid carries data-enter while it slides in and data-leaving while it slides out, each "next" or "prev", and slides by the cn-calendar-* keyframes. An event's mark is .cn-calendar-event with its data-kind, and .cn-calendar-event--icon when it is an icon; a dot takes its background, an icon its color:

.cn-calendar-event[data-kind="rain"] { color: #38bdf8; }
.cn-calendar-event[data-kind="deadline"] { background: var(--error); }
.cn-calendar-day[data-today] { background: transparent; }

Platforms and version

The component API is available in Blinc 0.6.0. The Live example runs in a dedicated worker and requires a compatible GPU surface. Preview and Code remain available when Live cannot start. The canvas has a descriptive label; a full screen-reader DOM mirror is not provided. The gallery integration is based on revision e2e55c24e078.

Recordings and live demos use the default Hybrid theme with bundled Noto Sans. The recording uses a 560 × 420 logical viewport at twice that resolution. Live follows its container and actual display density. Source base revision · Exact build source · Artifact versions and checksums · Font license.