smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Calendar

Calendar

Month view calendar with event indicators and day navigation.

Public export

typescript
import { Calendar } from '@happyvertical/smrt-ui/calendar';
Import path
@happyvertical/smrt-ui/calendar
Props
7
Props described
7 of 7
Bindable state
0
Callback events
3
Verified release
0.62.10

Props

NameTypeRequiredDescription
eventsDayEventsData[] | nullNoEvents data to display on calendar dates, or null to show no events.
yearnumberNoInitial year to display when the calendar first loads.
monthnumberNoInitial month to display (zero-indexed, where 0 is January).
baseUrlstringNoBase URL path for constructing day-specific links.
onMonthNavigate(direction: 'prev' | 'next', year: number, month: number) => voidNoCallback when navigating to prev/next month
onDateSelect(date: string, hasEvents: boolean) => voidNoCallback when a date cell is clicked
onTodayClick() => voidNoCallback when Today button is clicked

Bindable state

This component has no bindable public state.

Callback events

  • onMonthNavigate(direction: 'prev' | 'next', year: number, month: number) => void
  • onDateSelect(date: string, hasEvents: boolean) => void
  • onTodayClick() => void

Examples and explanation