Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

Calendar

Display events in month and week views with a synchronized agenda.

Category
Data and hierarchy
Import
@neural-ui/core/calendar
Selector
neu-calendar
import { NeuCalendarComponent } from '@neural-ui/core/calendar';

Usage

Each event has a unique id, title and start, with optional end, allDay, tone and metadata. selectedDate controls the displayed period and selected day; accept selectedDateChange to move it. view supports month or week; the event Template also receives agenda as its rendering context. locale and labels control calendar text, not event translations. Calendar displays events; creating or editing them belongs to your application.

Examples

Try this application-owned interaction. Its event handling and initial data are included in Code.

Examples

October 2026

Mon
Tue
Wed
Thu
Fri
Sat
Sun

Thursday, October 15

1 event

Events: 0

Try and configure

Change the public options, try the result and inspect the updated template. Code contains the complete executable implementation.

Try and configure

October 2026

Mon
Tue
Wed
Thu
Fri
Sat
Sun

Thursday, October 15

1 event

Events: 0

template.html
<neu-calendar
  [events]="events()"
  [selectedDate]="selectedDate()"
  (selectedDateChange)="
    selectedDate.set($event); record('selectedDateChange', $event)
  "
  [locale]="locale()"
  [view]="'month'"
  [showHeader]="true"
  [firstDayOfWeek]="1"
  [maxVisibleEvents]="2"
  (eventClick)="record('eventClick', $event.id)"
></neu-calendar>

State and events

Each event has a unique id, title and start, with optional end, allDay, tone and metadata. selectedDate controls the displayed period and selected day; accept selectedDateChange to move it. view supports month or week; the event Template also receives agenda as its rendering context. locale and labels control calendar text, not event translations. Calendar displays events; creating or editing them belongs to your application.

Accessibility and keyboard

Use Tab to reach period controls, days and events. Enter or Space selects a day or activates an event. In compact month views, select a day to see its complete events in the agenda.

Key
Action
Tab Move through period controls, days and events.
Enter Select the focused day or activate the focused event or period button.
Space Select the focused day or activate the focused event or period button.

API

Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.

Inputs

Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.

Name
Type
Default
Template binding
Description
eventsNeuCalendarEvent[][][events]Events with stable ids, titles, start dates and optional end/tone metadata.
firstDayOfWeeknumber1[firstDayOfWeek]First weekday in the calendar: 0 is Sunday, 1 is Monday.
labelsPartial<NeuCalendarLabels>{}[labels]Localized calendar navigation, agenda and event-count messages.
localestringthis.defaultLocaleDerived default[locale]Locale used for calendar month, weekday and date formatting.
maxVisibleEventsnumber3[maxVisibleEvents]Maximum event entries shown directly in each month cell.
selectedDatestring | Datethis.temporal.today()Derived default[selectedDate]Applied selected day and displayed period, as a date string or Date.
showHeaderbooleantrue[showHeader]Show period navigation and the calendar heading.
viewNeuCalendarView'month'[view]Choose month or week rendering. The agenda is an event Template context, not an input view.

Outputs

Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.

Name
Payload
Template binding
Description
eventClickNeuCalendarEvent(eventClick)="onEventClick($event)"Emits the activated calendar event.
selectedDateChangeDate(selectedDateChange)="onSelectedDateChange($event)"Proposes a Date after navigation or day selection. Apply it to selectedDate.

Templates

ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.

Name
Mechanism
Contract
NeuCalendarEventDirectiveView example Public template directive (entrypoint)ng-template[neuCalendarEvent]

Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.

NeuCalendarEventDirective

NeuCalendarEventDirective

NeuCalendarEventDirective

October 2026

Mon
Tue
Wed
Thu
Fri
Sat
Sun

Thursday, October 15

1 event

Events: 0

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.

Specific tokens

This component uses shared theme tokens rather than dedicated component hooks.

Shared tokens used

Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.

Token
Purpose here
Other impact
Default / fallback
--neu-border Normal control and cell borders Shared by other Core consumers; scope the override. rgba(15, 23, 42, 0.08)
--neu-error Invalid field or danger-action color Shared by other Core consumers; scope the override. #dc2626
--neu-primary Brand color for active controls and emphasis Shared by other Core consumers; scope the override. #007aff
--neu-surface Main field, header or control surface Shared by other Core consumers; scope the override. #ffffff
--neu-surface-2 Secondary surfaces and alternating rows Shared by other Core consumers; scope the override. #f1f5f9
--neu-text Main text and inherited icon color Shared by other Core consumers; scope the override. #0f172a
--neu-text-muted Secondary labels and supporting content Shared by other Core consumers; scope the override. #475569
--neu-radius-lg Corner radius Shared by other Core consumers; scope the override. 12px