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 | undefinedSelected date value.
onChange(date: Date) => voidCallback when date is confirmed.
placeholderstringPlaceholder text when no date selected.
titlestringTitle shown in the modal header.
variant"wheel" | "calendar""wheel"Picker presentation style.
modeDatePickerMode"date"Date granularity mode.
disabledbooleanfalseDisable the input.

DatePicker (Core)

PropTypeDefaultDescription
valueDateCurrently selected date.
onChange(date: Date) => voidCallback on date change.
variant"wheel" | "calendar""wheel"Picker type.
modeDatePickerMode"date"Selection mode.
minDateDateMinimum selectable date.
maxDateDateMaximum selectable date.
localeLocaleInputLocale configuration for month/day names.
orderDatePickerOrderColumn order for wheel variant.
monthFormat"short" | "full" | "numeric""short"Month label format.