Mobile › Inputs

Calendar

A month to pick one day from, with today ringed, arrows between months and days you can rule out.

Installation

npx expo install plankui-mobile react-native-safe-area-context expo-haptics

Usage

import { Calendar } from "plankui-mobile";

const [day, setDay] = useState<Date | null>(null);

<Calendar value={day} onChange={setDay} min={new Date()} />

API reference

PropTypeDefaultDescription
valueDate | null–The chosen day.
onChange(date: Date) => void–Called with the tapped day.
minDate–Days before this can't be picked.
maxDate–Days after this can't be picked.
weekStartsOn0 | 110 for Sunday, 1 for Monday.
localestringthe device'sLanguage for month and day names.