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-hapticsUsage
import { Calendar } from "plankui-mobile";
const [day, setDay] = useState<Date | null>(null);
<Calendar value={day} onChange={setDay} min={new Date()} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | Date | null | – | The chosen day. |
| onChange | (date: Date) => void | – | Called with the tapped day. |
| min | Date | – | Days before this can't be picked. |
| max | Date | – | Days after this can't be picked. |
| weekStartsOn | 0 | 1 | 1 | 0 for Sunday, 1 for Monday. |
| locale | string | the device's | Language for month and day names. |