---
modificationDate: September 15, 2026
title: DateTimePicker
description: Jetpack Compose components for selecting dates, date ranges, and times.
sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-58/packages/expo-ui'
packageName: '@expo/ui'
platforms: ['android', 'expo-go']
---

This documentation is available as Markdown for AI agents and LLMs. See the [full Markdown index](/llms.txt) or append .md to any documentation URL.

# DateTimePicker

Jetpack Compose components for selecting dates, date ranges, and times.

<AgentInstructions>

## Submitting Feedback

If you encounter errors, misleading or outdated information, report it so Expo can be improved:

Preferred command:
npx --yes submit-expo-feedback@latest --category docs --subject "/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker/" "<actionable feedback>"

Direct HTTP fallback:
curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker/","feedback":"🤖 Agent feedback for docs: <specific, actionable description> (<model>, <harness>)"}'

Only submit when you have something specific and actionable to report. Try to give the most context.

## Navigation

When answering a related or follow-up question, use llms.txt to find the relevant page as Markdown (.md) instead of guessing.

You are here: Reference (v58.0.0) > Expo UI > Jetpack Compose (51 pages in this section)
Full documentation tree: [llms.txt](https://docs.expo.dev/llms.txt)

</AgentInstructions>
Android, Included in Expo Go

Expo UI's date and time picker components match the official Jetpack Compose [Date Picker](https://developer.android.com/develop/ui/compose/components/datepickers), [Date Range Picker](https://developer.android.com/develop/ui/compose/components/datepickers#range), and [Time Picker](https://developer.android.com/develop/ui/compose/components/time-pickers) APIs.

> **Note:** The date variants render Material's calendar grid and input field, both of which scroll horizontally internally. The parent `Host` must provide a finite width on the horizontal axis, use `matchContents={{ vertical: true }}` together with `style={{ width: '100%' }}` (or any finite width). See [Match contents in Host reference](/versions/v58.0.0/sdk/ui/jetpack-compose/host.md#match-contents) for details.

> **Note:** `DateRangePicker` also scrolls vertically and fills the finite height provided by its parent. Place its `Host` in a bounded layout, such as one using `flex: 1`. Do not use `matchContents` on the vertical axis.

Image: Material 3 date picker showing a selected date in a calendar grid

## Installation

```sh
# npm
npx expo install @expo/ui

# yarn
yarn expo install @expo/ui

# pnpm
pnpm expo install @expo/ui

# bun
bun expo install @expo/ui
```

If you are installing this in an [existing React Native app](/bare/overview.md), make sure to [install `expo`](/bare/installing-expo-modules.md) in your project.

## Usage

### Date picker

```tsx DatePickerExample.tsx
import { useState } from 'react';
import { Host, DateTimePicker } from '@expo/ui/jetpack-compose';

export default function DatePickerExample() {
  const [selectedDate, setSelectedDate] = useState(new Date());

  return (
    <Host
      matchContents={{ vertical: true }}
      style={{ width: '100%' }}>
      <DateTimePicker
        onDateSelected={date => {
          setSelectedDate(date);
        }}
        displayedComponents="date"
        initialDate={selectedDate.toISOString()}
        variant="picker"
      />
    </Host>
  );
}
```

### Time picker

```tsx TimePickerExample.tsx
import { useState } from 'react';
import { Host, DateTimePicker } from '@expo/ui/jetpack-compose';

export default function TimePickerExample() {
  const [selectedDate, setSelectedDate] = useState(new Date());

  return (
    <Host
      matchContents={{ vertical: true }}
      style={{ width: '100%' }}>
      <DateTimePicker
        onDateSelected={date => {
          setSelectedDate(date);
        }}
        displayedComponents="hourAndMinute"
        initialDate={selectedDate.toISOString()}
        variant="picker"
      />
    </Host>
  );
}
```

### Input variant

Use `variant="input"` to display the picker as a text input field instead of the default picker UI.

```tsx InputVariantExample.tsx
import { useState } from 'react';
import { Host, DateTimePicker } from '@expo/ui/jetpack-compose';

export default function InputVariantExample() {
  const [selectedDate, setSelectedDate] = useState(new Date());

  return (
    <Host
      matchContents={{ vertical: true }}
      style={{ width: '100%' }}>
      <DateTimePicker
        onDateSelected={date => {
          setSelectedDate(date);
        }}
        displayedComponents="date"
        initialDate={selectedDate.toISOString()}
        variant="input"
      />
    </Host>
  );
}
```

### Date range picker

```tsx DateRangePickerAndroidExample.tsx
import { useState } from 'react';
import {
  DateRangePicker,
  type DateRangeSelection,
  Host,
} from '@expo/ui/jetpack-compose';

export default function DateRangePickerAndroidExample() {
  const [range, setRange] = useState<DateRangeSelection>({
    start: new Date(),
    end: new Date(Date.now() + 5 * 24 * 60 * 60 * 1000),
  });

  return (
    <Host style={{ flex: 1 }}>
      <DateRangePicker
        initialStartDate={range.start?.toISOString()}
        initialEndDate={range.end?.toISOString()}
        onDateRangeSelected={setRange}
      />
    </Host>
  );
}
```

The callback's `end` value is `null` until the user finishes selecting the range.

### Date range picker dialog

```tsx DateRangePickerDialogExample.tsx
import { useState } from 'react';
import { Button } from 'react-native';
import {
  DateRangePickerDialog,
  type DateRangeSelection,
  Host,
} from '@expo/ui/jetpack-compose';

export default function DateRangePickerDialogExample() {
  const [visible, setVisible] = useState(false);
  const [range, setRange] = useState<DateRangeSelection>({
    start: null,
    end: null,
  });

  return (
    <>
      <Button
        title="Select dates"
        onPress={() => setVisible(true)}
      />
      {visible && (
        <Host>
          <DateRangePickerDialog
            initialStartDate={range.start?.toISOString()}
            initialEndDate={range.end?.toISOString()}
            onDateRangeSelected={selectedRange => {
              setRange(selectedRange);
              setVisible(false);
            }}
            onDismissRequest={() => setVisible(false)}
          />
        </Host>
      )}
    </>
  );
}
```

## API

```tsx
import {
  DateRangePicker,
  DateRangePickerDialog,
  DateTimePicker,
} from '@expo/ui/jetpack-compose';
```

## Components

### `DatePickerDialog`

Supported platforms: Android.

Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component)<[DatePickerDialogProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datepickerdialogprops)\>

DatePickerDialogProps

### `color`

Supported platforms: Android.

Optional • Type: [ColorValue](https://reactnative.dev/docs/colors)

### `confirmButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

### `dismissButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

### `elementColors`

Supported platforms: Android.

Optional • Type: [DatePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datepickerelementcolors) & [TimePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#timepickerelementcolors)

### `initialDate`

Supported platforms: Android.

Optional • Literal type: `union`

The initially selected date. When omitted, the dialog opens on the current month with no selection and the confirm button stays disabled until a date is picked.

Acceptable values are: `string` | `null`

### `onDateSelected`

Supported platforms: Android.

Optional • Type: (date: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)) => void

### `onDismissRequest`

Supported platforms: Android.

Type: `() => void`

### `selectableDates`

Supported platforms: Android.

Optional • Type: { end: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), start: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) }

### `showVariantToggle`

Supported platforms: Android.

Optional • Type: `boolean`

### `variant`

Supported platforms: Android.

Optional • Type: [AndroidVariant](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#androidvariant)

### `DateRangePicker`

Supported platforms: Android.

Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component)<[DateRangePickerProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#daterangepickerprops)\>

Renders an inline Material 3 date range picker.

DateRangePickerProps

### `color`

Supported platforms: Android.

Optional • Type: [ColorValue](https://reactnative.dev/docs/colors)

The tint color to use on the picker elements.

### `elementColors`

Supported platforms: Android.

Optional • Type: [DatePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datepickerelementcolors)

Fine-grained color overrides for individual picker elements.

### `initialEndDate`

Supported platforms: Android.

Optional • Literal type: `union`

The initially selected end date, as an ISO 8601 string. It must be on or after `initialStartDate`.

Acceptable values are: `string` | `null`

### `initialStartDate`

Supported platforms: Android.

Optional • Literal type: `union`

The initially selected start date, as an ISO 8601 string.

Acceptable values are: `string` | `null`

### `modifiers`

Supported platforms: Android.

Optional • Type: `ModifierConfig[]`

Modifiers for the component.

### `onDateRangeSelected`

Supported platforms: Android.

Optional • Type: (range: [DateRangeSelection](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#daterangeselection)) => void

Called once when the component mounts with the initial range, and again whenever the selected date range changes. The end date is `null` while the user is selecting a range.

### `selectableDates`

Supported platforms: Android.

Optional • Type: { end: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), start: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) }

Constrains which dates can be selected. `start` is the earliest selectable date and `end` is the latest.

### `showVariantToggle`

Supported platforms: Android.

Optional • Type: `boolean` • Default: `true`

Show a button to toggle between variants on Android.

### `variant`

Supported platforms: Android.

Optional • Type: [AndroidVariant](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#androidvariant) • Default: `'picker'`

The variant of the picker, which determines its appearance and behavior.

### `DateRangePickerDialog`

Supported platforms: Android.

Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component)<[DateRangePickerDialogProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#daterangepickerdialogprops)\>

Renders a modal Material 3 date range picker.

DateRangePickerDialogProps

### `color`

Supported platforms: Android.

Optional • Type: [ColorValue](https://reactnative.dev/docs/colors)

The tint color to use on the picker elements and dialog buttons.

### `confirmButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

The label for the button that confirms the selected range. Defaults to the system "Ok" string.

### `dismissButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

The label for the button that dismisses the dialog. Defaults to the system "Cancel" string.

### `onDateRangeSelected`

Supported platforms: Android.

Optional • Type: (range: [DateRangeSelection](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#daterangeselection)) => void

Callback function that is called when the user confirms a complete date range.

### `onDismissRequest`

Supported platforms: Android.

Type: `() => void`

Callback function that is called when the dialog is dismissed.

#### Inherited props

-   [Omit](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)<[DateRangePickerProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#daterangepickerprops), 'modifiers'\>

### `DateTimePicker`

Supported platforms: Android.

Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component)<[DateTimePickerProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datetimepickerprops)\>

Renders an inline `DateTimePicker` component.

DateTimePickerProps

### `color`

Supported platforms: Android.

Optional • Type: [ColorValue](https://reactnative.dev/docs/colors)

The tint color to use on the picker elements. When `elementColors` is not provided, this color is applied to a subset of picker elements (selected day, title, headline, today border for date picker; selector, selected time segment, clock dial for time picker).

### `displayedComponents`

Supported platforms: Android.

Optional • Type: [DisplayedComponents](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#displayedcomponents) • Default: `'date'`

The components that the picker should display. On Android, you can have a picker that selects just the date or just the time. `dateAndTime` is only available on iOS and will result in a date picker on Android. On iOS, you can have a picker that selects both date and time.

### `elementColors`

Supported platforms: Android.

Optional • Type: [DatePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datepickerelementcolors) & [TimePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#timepickerelementcolors)

Fine-grained color overrides for individual picker elements. When provided, these take precedence over the `color` prop. Date picker color keys are used when `displayedComponents` is 'date' or 'dateAndTime'. Time picker color keys are used when `displayedComponents` is 'hourAndMinute'. Unset values fall back to Material 3 theme defaults.

### `initialDate`

Supported platforms: Android.

Optional • Literal type: `union`

The initial date to display on the picker.

Acceptable values are: `string` | `null`

### `is24Hour`

Supported platforms: Android.

Optional • Type: `boolean` • Default: `true`

Determines what format the clock should be displayed in on Android.

### `modifiers`

Supported platforms: Android.

Optional • Type: `ModifierConfig[]`

Modifiers for the component.

### `onDateSelected`

Supported platforms: Android.

Optional • Type: (date: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)) => void

Callback function that is called when a date is selected.

### `selectableDates`

Supported platforms: Android.

Optional • Type: { end: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), start: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) }

Constrains which dates can be selected. Mirrors the native Compose `selectableDates` parameter. `start` is the earliest selectable date, `end` is the latest.

### `showVariantToggle`

Supported platforms: Android.

Optional • Type: `boolean` • Default: `true`

Show a button to toggle between variants on Android.

### `variant`

Supported platforms: Android.

Optional • Type: [AndroidVariant](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#androidvariant) • Default: `'picker'`

The variant of the picker, which determines its appearance and behavior.

### `TimePickerDialog`

Supported platforms: Android.

Type: React.[Element](https://www.typescriptlang.org/docs/handbook/jsx.html#function-component)<[TimePickerDialogProps](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#timepickerdialogprops)\>

TimePickerDialogProps

### `color`

Supported platforms: Android.

Optional • Type: [ColorValue](https://reactnative.dev/docs/colors)

### `confirmButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

### `dismissButtonLabel`

Supported platforms: Android.

Optional • Type: `string`

### `elementColors`

Supported platforms: Android.

Optional • Type: [DatePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#datepickerelementcolors) & [TimePickerElementColors](/versions/v58.0.0/sdk/ui/jetpack-compose/datetimepicker.md#timepickerelementcolors)

### `initialDate`

Supported platforms: Android.

Optional • Literal type: `union`

Acceptable values are: `string` | `null`

### `is24Hour`

Supported platforms: Android.

Optional • Type: `boolean`

### `onDateSelected`

Supported platforms: Android.

Optional • Type: (date: [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)) => void

### `onDismissRequest`

Supported platforms: Android.

Type: `() => void`

## Types

### `AndroidVariant`

Supported platforms: Android.

Literal type: `string`

Acceptable values are: `'picker'` | `'input'`

### `DatePickerElementColors`

Supported platforms: Android.

Color overrides for the Material 3 DatePicker component. All properties are optional — unset values use Material 3 theme defaults.

| Property | Type | Description |
| --- | --- | --- |
| containerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the date picker. |
| currentYearContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the current year content. |
| dayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for day content (number text). |
| dayInSelectionRangeContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The container color for days within a date range selection. |
| dayInSelectionRangeContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The content color for days within a date range selection. |
| disabledDayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for disabled day content. |
| disabledSelectedDayContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for a disabled selected day container. |
| disabledSelectedDayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for a disabled selected day content. |
| disabledSelectedYearContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for a disabled selected year container. |
| disabledSelectedYearContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for a disabled selected year content. |
| disabledYearContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for disabled year item content. |
| dividerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for divider lines. |
| headlineContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the date picker's headline. |
| navigationContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for navigation arrows and year selection menu button. |
| selectedDayContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the selected day container/background circle. |
| selectedDayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for selected day content. |
| selectedYearContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the selected year container/background. |
| selectedYearContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the selected year content. |
| subheadContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the month and year subhead labels. |
| titleContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the date picker's title. |
| todayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for today's date text. |
| todayDateBorderColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for today's date border. |
| weekdayContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for the weekday letters (Mon, Tue, etc.). |
| yearContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color used for year item content. |

### `DateRangeSelection`

Supported platforms: Android.

The date range reported by `DateRangePicker` and `DateRangePickerDialog`.

| Property | Type | Description |
| --- | --- | --- |
| end | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | null | The selected end date, or `null` until the user selects the second date of the range. |
| start | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | null | The selected start date, or `null` when no start date is selected. |

### `DisplayedComponents`

Supported platforms: Android.

Literal type: `string`

Acceptable values are: `'date'` | `'hourAndMinute'` | `'dateAndTime'`

### `TimePickerElementColors`

Supported platforms: Android.

Color overrides for the Material 3 TimePicker component. All properties are optional — unset values use Material 3 theme defaults.

| Property | Type | Description |
| --- | --- | --- |
| clockDialColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the clock dial. |
| clockDialSelectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color of clock dial numbers when selected or overlapping the selector. |
| clockDialUnselectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color of clock dial numbers when unselected. |
| containerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The container/background color of the time picker. |
| periodSelectorBorderColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The border color of the AM/PM period selector. |
| periodSelectorSelectedContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the selected AM/PM period. |
| periodSelectorSelectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The text color of the selected AM/PM period. |
| periodSelectorUnselectedContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the unselected AM/PM period. |
| periodSelectorUnselectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The text color of the unselected AM/PM period. |
| selectorColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The color of the clock dial selector (hand). |
| timeSelectorSelectedContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the selected hour/minute segment. |
| timeSelectorSelectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The text color of the selected hour/minute segment. |
| timeSelectorUnselectedContainerColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The background color of the unselected hour/minute segment. |
| timeSelectorUnselectedContentColor(optional) | [ColorValue](https://reactnative.dev/docs/colors) | The text color of the unselected hour/minute segment. |
