# DocyFieldDatetime URL: /docs/native/expo/datetime Combined date and time picker form field — thin wrapper around DocyFieldDate. ## Overview `DocyFieldDatetime` is a convenience wrapper around [`DocyFieldDate`](/docs/native/expo/date) with `mode="datetime"` always set. It presents both a date and time picker in a single interaction. ## Installation ```bash pnpm dlx @docyrus/cli add @docyrus/rn-form-fields ``` ```bash # Required: @react-native-community/datetimepicker npx expo install @react-native-community/datetimepicker ``` **Dependencies:** - [@react-native-community/datetimepicker](https://www.npmjs.com/package/@react-native-community/datetimepicker) ## Usage ```tsx import { DocyFieldDatetime } from '@/components/docyrus-native/form-fields/docy-field-datetime'; const [dateTime, setDateTime] = useState(null); ``` ## API Reference All props from [`DocyFieldDate`](/docs/native/expo/date) except `mode` (always `'datetime'`). | Prop | Type | Default | Description | |------|------|---------|-------------| | `value` | `Date \| null` | `null` | Selected date and time | | `onChange` | `(date: Date \| null) => void` | — | Called when value changes | | `minimumDate` | `Date` | — | Minimum selectable date | | `maximumDate` | `Date` | — | Maximum selectable date | | `dateFormat` | `'short' \| 'medium' \| 'long' \| 'full'` | `'medium'` | Date format preset | | `timeFormat` | `'12h' \| '24h'` | `'12h'` | Time format | | `clearable` | `boolean` | `true` | Show clear button | Inherits all [rn-form-fields](/docs/native/docyrus/form-fields) (name, label, placeholder, helpText, required, disabled, readOnly, error, size, variant, etc.) ## Type Exports | Type | Description | |------|-------------| | `DocyFieldDatetimeProps` | `Omit` |