This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
DateTimePicker
A date and time picker compatible with @react-native-community/datetimepicker.
A DateTimePicker component with an API compatible with @react-native-community/datetimepicker. It uses Jetpack Compose on Android and SwiftUI on iOS, providing a modern Material 3 and SwiftUI appearance by default (the community module defaults to the older look on Android).
DateTimePicker component is fully declarative. Use the presentation prop to render the picker 'inline' directly in the view hierarchy or as a 'dialog' on Android. There is no Android imperative API (DateTimePickerAndroid.open()).
Under the hood this component wraps the platform-specific @expo/ui primitives:
- Android: Jetpack Compose DateTimePicker (inline), DatePickerDialog/TimePickerDialog (dialog)
- iOS: SwiftUI DatePicker
If you need lower-level control (custom modifiers, styles, or layouts), use those primitives directly.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Migrating from @react-native-community/datetimepicker
- Update the import from
import DateTimePicker from '@react-native-community/datetimepicker'toimport DateTimePicker from '@expo/ui/community/datetime-picker'. - There is no imperative
DateTimePickerAndroid.open()API. Render the component and usepresentation="dialog"instead. minuteInterval,textColor,firstDayOfWeek,neutralButton,onNeutralButtonPress,fullscreen,titleandstartOnYearSelectionprops are not supported.- Use
timeZoneName(IANA name) instead oftimeZoneOffsetInMinutes. - The
countdownmode is not supported. onErrorprop is not needed.
Basic usage
Time picker
With date constraints
Dialog presentation
On Android, you can use presentation="dialog" to show the picker as a modal dialog. The dialog opens when the component mounts. Unmount it in response to onValueChange or onDismiss. On iOS, this prop is ignored and the picker always renders inline.
API
import DateTimePicker from '@expo/ui/community/datetime-picker';
No API data file found, sorry!