Command palette

@yasinsensoy/native

React Native · Components

Calendar

Month calendar: selects a single day, a range or multiple days.

9 exports

Live example

The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.

Preview

SunMonTueWedThuFriSat

Code

import { Calendar } from "@yasinsensoy/native";

<Calendar
  marks={etkinlikGunleri} // ["2026-10-14", …]
  value={gun} onValueChange={setGun} // "2026-10-28" />

Events

  1. Events appear here when you interact with the preview.

Two months side by side, range and week numbers

WkSunMonTueWedThuFriSat
45
46
47
48
49
WkSunMonTueWedThuFriSat
49
50
51
52
53

Import

import { Calendar } from "@yasinsensoy/native";

Calendar

component

Month calendar: selects a single day, a range or multiple days. Month and day names and the first day of the week come from the UIProvider locale. Tapping the month name in the header opens the month, then the year view; swiping left/right changes the month. Days have 44-pixel touch targets. Calculations are the same as web (@yasinsensoy/core/date).

Calendar(props: CalendarProps): JSX.Element

Examples

<Calendar value={day} onValueChange={setDay} min={new Date()} />
<Calendar mode="range" value={range} onValueChange={setRange} maxDays={14} />

Type of props that take a date: an ISO date string like "2026-10-28" or a Date. For a Date, the day in local time is used.

type DateInput = string | Date

DateRange

interface

A date range. Values are ISO date strings in "YYYY-MM-DD" form; an unselected end is an empty string ("").

NameTypeDescription
startstringStart day.
endstringEnd day (the start is included).

Props shared by all calendar types (same names as web).

NameTypeDefaultDescription
min?DateInputEarliest selectable day.
max?DateInputLatest selectable day.
isDateDisabled?(date: Date) => booleanDays that cannot be selected (e.g. weekends).
disabled?booleanThe whole calendar is disabled.
readOnly?booleanDisplay only.
month?DateInputDisplayed month (controlled).
defaultMonth?DateInputthe selected day or todayInitially displayed month.
onMonthChange?(month: string) => voidISO day ("2026-10-01") when the displayed month changes.
weekStartsOn?0 | 1 | 2 | 3 | 4 | 5 | 6from the localeFirst day of the week (0 Sunday … 6 Saturday).
showOutsideDays?booleantrueShow days of the previous and next month faded.
fixedWeeks?booleanfalse6 weeks every month: the height stays fixed.
marks?readonly DateInput[] | ((date: Date) => boolean)Days with a dot below (e.g. an event).
aria-label?stringthe {@link UIProvider} `calendar` textScreen reader name.
style?StyleProp<ViewStyle>Container style.

Type of props that take a range; ends may be strings or Dates.

NameTypeDescription
start?DateInput | nullStart day.
end?DateInput | nullEnd day.

Calendar selecting a single day.

NameTypeDefaultDescription
mode?"single"Single day.
value?DateInputSelected day (controlled); "" for none.
defaultValue?DateInputInitially selected day.
onValueChange?(value: string, date: Date | undefined) => voidISO day and Date when the selection changes.
min?DateInputEarliest selectable day.
max?DateInputLatest selectable day.
isDateDisabled?(date: Date) => booleanDays that cannot be selected (e.g. weekends).
disabled?booleanThe whole calendar is disabled.
readOnly?booleanDisplay only.
month?DateInputDisplayed month (controlled).
defaultMonth?DateInputthe selected day or todayInitially displayed month.
onMonthChange?(month: string) => voidISO day ("2026-10-01") when the displayed month changes.
weekStartsOn?0 | 1 | 2 | 3 | 4 | 5 | 6from the localeFirst day of the week (0 Sunday … 6 Saturday).
showOutsideDays?booleantrueShow days of the previous and next month faded.
fixedWeeks?booleanfalse6 weeks every month: the height stays fixed.
marks?readonly DateInput[] | ((date: Date) => boolean)Days with a dot below (e.g. an event).
aria-label?stringthe {@link UIProvider} `calendar` textScreen reader name.
style?StyleProp<ViewStyle>Container style.

Calendar selecting a date range.

NameTypeDefaultDescription
mode"range"The first tap picks the start, the second the end.
value?DateRangeInputSelected range (controlled).
defaultValue?DateRangeInputInitial range.
onValueChange?(range: DateRange) => voidWhen the selection changes; end is empty until the end is picked.
minDays?numberMinimum number of days in the range (both ends included).
maxDays?numberMaximum number of days in the range.
min?DateInputEarliest selectable day.
max?DateInputLatest selectable day.
isDateDisabled?(date: Date) => booleanDays that cannot be selected (e.g. weekends).
disabled?booleanThe whole calendar is disabled.
readOnly?booleanDisplay only.
month?DateInputDisplayed month (controlled).
defaultMonth?DateInputthe selected day or todayInitially displayed month.
onMonthChange?(month: string) => voidISO day ("2026-10-01") when the displayed month changes.
weekStartsOn?0 | 1 | 2 | 3 | 4 | 5 | 6from the localeFirst day of the week (0 Sunday … 6 Saturday).
showOutsideDays?booleantrueShow days of the previous and next month faded.
fixedWeeks?booleanfalse6 weeks every month: the height stays fixed.
marks?readonly DateInput[] | ((date: Date) => boolean)Days with a dot below (e.g. an event).
aria-label?stringthe {@link UIProvider} `calendar` textScreen reader name.
style?StyleProp<ViewStyle>Container style.

Calendar selecting multiple days.

NameTypeDefaultDescription
mode"multiple"Each tap selects or deselects a day.
value?readonly DateInput[]Selected days (controlled).
defaultValue?readonly DateInput[]Initially selected days.
onValueChange?(values: string[], dates: Date[]) => voidSorted ISO days and Dates when the selection changes.
min?DateInputEarliest selectable day.
max?DateInputLatest selectable day.
isDateDisabled?(date: Date) => booleanDays that cannot be selected (e.g. weekends).
disabled?booleanThe whole calendar is disabled.
readOnly?booleanDisplay only.
month?DateInputDisplayed month (controlled).
defaultMonth?DateInputthe selected day or todayInitially displayed month.
onMonthChange?(month: string) => voidISO day ("2026-10-01") when the displayed month changes.
weekStartsOn?0 | 1 | 2 | 3 | 4 | 5 | 6from the localeFirst day of the week (0 Sunday … 6 Saturday).
showOutsideDays?booleantrueShow days of the previous and next month faded.
fixedWeeks?booleanfalse6 weeks every month: the height stays fixed.
marks?readonly DateInput[] | ((date: Date) => boolean)Days with a dot below (e.g. an event).
aria-label?stringthe {@link UIProvider} `calendar` textScreen reader name.
style?StyleProp<ViewStyle>Container style.

Props of Calendar.

type CalendarProps = SingleCalendarProps | RangeCalendarProps | MultipleCalendarProps
NameTypeDefaultDescription
mode?"single" | "range" | "multiple"Single day.
value?DateInput | DateRangeInput | readonly DateInput[]Selected day (controlled); "" for none.
defaultValue?DateInput | DateRangeInput | readonly DateInput[]Initially selected day.
onValueChange?(value: string, date: Date | undefined) => void | (range: DateRange) => void | (values: string[], dates: Date[]) => voidISO day and Date when the selection changes.
min?DateInputEarliest selectable day.
max?DateInputLatest selectable day.
isDateDisabled?(date: Date) => booleanDays that cannot be selected (e.g. weekends).
disabled?booleanThe whole calendar is disabled.
readOnly?booleanDisplay only.
month?DateInputDisplayed month (controlled).
defaultMonth?DateInputthe selected day or todayInitially displayed month.
onMonthChange?(month: string) => voidISO day ("2026-10-01") when the displayed month changes.
weekStartsOn?0 | 1 | 2 | 3 | 4 | 5 | 6from the localeFirst day of the week (0 Sunday … 6 Saturday).
showOutsideDays?booleantrueShow days of the previous and next month faded.
fixedWeeks?booleanfalse6 weeks every month: the height stays fixed.
marks?readonly DateInput[] | ((date: Date) => boolean)Days with a dot below (e.g. an event).
aria-label?stringthe {@link UIProvider} `calendar` textScreen reader name.
style?StyleProp<ViewStyle>Container style.
minDays?numberMinimum number of days in the range (both ends included).(RangeCalendarProps)
maxDays?numberMaximum number of days in the range.(RangeCalendarProps)