Skip to Content
Expo

KivaFieldDateRange

Date range picker form field with start/end selector using native date picker.

iOSAndroid
Preview KivaFieldDateRange on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Overview

KivaFieldDateRange provides a start and end date picker. On iOS it uses an ActionSheet with tab-based Start/End switching; on Android it opens sequential native date picker dialogs.

Installation

pnpm dlx @kivacore/ui-cli add @kivacore/rn-form-fields
# Required: @react-native-community/datetimepicker
npx expo install @react-native-community/datetimepicker
Required Packages(1 package)
pnpm add @react-native-community/datetimepicker

Usage

import { KivaFieldDateRange } from '@/components/kiva-native/form-fields/kiva-field-date-range';

const [range, setRange] = useState<{
  startDate: Date | null;
  endDate: Date | null;
}>({ startDate: null, endDate: null });

<KivaFieldDateRange
  name="vacation"
  label="Vacation Period"
  value={range}
  onChange={setRange}
  dateFormat="long"
  clearable
/>

API Reference

PropTypeDefaultDescription
valueKivaFieldDateRangeValue{ startDate: null, endDate: null }Start and end dates
onChange(value: KivaFieldDateRangeValue) => void—Called when value changes
onBlur() => void—Blur handler
onFocus() => void—Focus handler
minimumDateDate—Minimum selectable date
maximumDateDate—Maximum selectable date
dateFormat'short' | 'medium' | 'long' | 'full''medium'Date format preset
formatstring—Custom date pattern
separatorstring' – 'Separator between start and end display
clearablebooleantrueShow clear button
allowSameDatebooleantrueAllow start and end to be the same date
calendarIconReactNode—Custom calendar icon
clearIconReactNode—Custom clear icon
iconSizenumber20Icon size in pixels
iconColorstring—Icon color override

Inherits all KivaFieldBaseProps (name, label, placeholder, helpText, required, disabled, readOnly, error, size, variant, etc.)

Platform Behavior

PlatformBehavior
iOSActionSheet with Start/End tabs + spinner picker
AndroidSequential native date picker dialogs
WebFallback message (native picker not available)

Type Exports

TypeDescription
KivaFieldDateRangeValue{ startDate: Date | null; endDate: Date | null }
KivaFieldDateRangePropsProps for KivaFieldDateRange component

Compatibility

PlatformSupport
Expo GoYes
Dev ClientYes
Bare RNYes (auto-linked)

On this page