Skip to Content
Expo

KivaFieldDatetime

Combined date and time picker form field — thin wrapper around KivaFieldDate.

iOSAndroid
Preview KivaFieldDatetime on your device

Scan with Expo Go

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

Overview

KivaFieldDatetime is a convenience wrapper around KivaFieldDate with mode="datetime" always set. It presents both a date and time picker in a single interaction.

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 { KivaFieldDatetime } from '@/components/kiva-native/form-fields/kiva-field-datetime';

const [dateTime, setDateTime] = useState<Date | null>(null);

<KivaFieldDatetime
  name="meeting"
  label="Meeting Time"
  value={dateTime}
  onChange={setDateTime}
  dateFormat="long"
  timeFormat="24h"
/>

API Reference

All props from KivaFieldDate except mode (always 'datetime').

PropTypeDefaultDescription
valueDate | nullnullSelected date and time
onChange(date: Date | null) => void—Called when value changes
minimumDateDate—Minimum selectable date
maximumDateDate—Maximum selectable date
dateFormat'short' | 'medium' | 'long' | 'full''medium'Date format preset
timeFormat'12h' | '24h''12h'Time format
clearablebooleantrueShow clear button

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

Type Exports

TypeDescription
KivaFieldDatetimePropsOmit<KivaFieldDateProps, 'mode'>

On this page