Skip to content

DatePicker

The DatePicker suite provides a complete date selection system with multiple presentation styles.

Components

ComponentDescription
DatePickerCore picker with wheel or calendar variant
DatePickerCardInline card with confirm/cancel actions
DatePickerModalFull-screen modal presentation
DatePickerDialogAlert-style dialog presentation
DatePickerInputPressable input field that opens a modal

Usage

DatePickerInput (Most Common)

DatePickerInputExample.tsx
import { useState } from 'react';
import { DatePickerInput } from '@masumdev/rn-ui';
export function DatePickerExample() {
const [date, setDate] = useState<Date | undefined>();
return (
<DatePickerInput
title="SELECT DATE"
placeholder="Choose a date"
value={date}
onChange={setDate}
/>
);
}

DatePickerCard (Inline)

DatePickerCardExample.tsx
import { useState } from 'react';
import { DatePickerCard } from '@masumdev/rn-ui';
export function DatePickerCardExample() {
const [date, setDate] = useState(new Date());
return (
<DatePickerCard
value={date}
onChange={setDate}
variant="wheel"
mode="date"
/>
);
}

Variants & Modes

  • Variants: "wheel" (iOS-style scroll columns) | "calendar" (month grid)
  • Modes: "date" | "month-year" | "month" | "year"

Props API

DatePickerInput

PropTypeDefaultDescription
valueDate | undefined—Selected date value.
onChange(date: Date) => void—Callback when date is confirmed.
placeholderstring—Placeholder text when no date selected.
titlestring—Title shown in the modal header.
variant"wheel" | "calendar""wheel"Picker presentation style.
modeDatePickerMode"date"Date granularity mode.
disabledbooleanfalseDisable the input.

DatePicker (Core)

PropTypeDefaultDescription
valueDate—Currently selected date.
onChange(date: Date) => void—Callback on date change.
variant"wheel" | "calendar""wheel"Picker type.
modeDatePickerMode"date"Selection mode.
minDateDate—Minimum selectable date.
maxDateDate—Maximum selectable date.
localeLocaleInput—Locale configuration for month/day names.
orderDatePickerOrder—Column order for wheel variant.
monthFormat"short" | "full" | "numeric""short"Month label format.