---
title: "rememberTimePickerState"
description: "Creates a [TimePickerState] for a time picker that is remembered across compositions and
configuration changes."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@Composable
@ExperimentalMaterial3Api
fun rememberTimePickerState(
    initialHour: Int = 0,
    initialMinute: Int = 0,
    is24Hour: Boolean = is24HourFormat,
): TimePickerState
```


Creates a `TimePickerState` for a time picker that is remembered across compositions and
configuration changes.

#### Parameters

| | |
| --- | --- |
| initialHour | starting hour for this state, will be displayed in the time picker when launched. Ranges from 0 to 23 |
| initialMinute | starting minute for this state, will be displayed in the time picker when launched. Ranges from 0 to 59 |
| is24Hour | The format for this time picker. `false` for 12 hour format with an AM/PM toggle or `true` for 24 hour format without toggle. Defaults to follow system setting. |





