Calendar
A month grid for picking a date, with min/max and disabled days.
Import
import { Calendar } from "@tarve/core";Usage
import { Calendar } from "@tarve/core";
let month = "2026-09";
let date = "2026-09-22";
<Calendar
month={month}
value={date}
weekStartsOn={1}
isDateDisabled={(day) => new Date(day).getDay() === 0}
onMonthChange={(next) => {
month = next;
}}
onValueChange={(next) => {
date = next;
}}
/>Props
| Prop | Type | Default |
|---|---|---|
month required | string | — |
disabled | boolean | — |
isDateDisabled | (date: string) => boolean | — |
max | string | — |
min | string | — |
onMonthChange | (month: string) => void | — |
onValueChange | (date: string) => void | — |
value | string | — |
weekStartsOn | CalendarWeekStartsOn | 0 |
Common props
Shared by every component. See descriptions →
childrenhighlightidkeymotionFromonHighlightonPasteonTransitionEndrovingGroupstyleTypes
type CalendarWeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;