# GuidedDatePickerAction

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/GuidedDatePickerAction.java+class:androidx.leanback.widget.GuidedDatePickerAction) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
class GuidedDatePickerAction : GuidedAction
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) |||
|   | ↳ | [androidx.leanback.widget.GuidedAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction) ||
|   |   | ↳ | [androidx.leanback.widget.GuidedDatePickerAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction) |

*** ** * ** ***

Subclass of GuidedAction that can choose a date. The Action is editable by default; to make it read only, call hasEditableActivatorView(false) on the Builder.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction.Builder : https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase<https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction.Builder!>` Builder class to build a GuidedDatePickerAction. |
| `abstract class https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase<B : https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction.BuilderBase?> : https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction.BuilderBase<B!>` Base Builder class to build GuidedDatePickerAction. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#GuidedDatePickerAction()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#getDate()()` Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#getDatePickerFormat()()` Returns format of date Picker or null if not specified. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#getMaxDate()()` Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#getMinDate()()` Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone. -1 if not set. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#onRestoreInstanceState(android.os.Bundle,java.lang.String)(bundle: https://developer.android.com/reference/android/os/Bundle.html, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Restore action from a bundle using a given key. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#onSaveInstanceState(android.os.Bundle,java.lang.String)(bundle: https://developer.android.com/reference/android/os/Bundle.html, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Save action into a bundle using a given key. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction#setDate(long)(date: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone. |

### Inherited Constants

From [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#NO_ID() = -1`

Indicates that an id has not been set.
From [androidx.leanback.widget.GuidedAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CANCEL() = -5`

Id of standard Cancel action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CONTINUE() = -7`

Id of standard Finish action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_CURRENT() = -3`

When finishing editing, stay on current action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_FINISH() = -6`

Id of standard Finish action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_NEXT() = -2`

When finishing editing, goes to next action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_NO() = -9`

Id of standard No action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_OK() = -4`

Id of standard OK action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#ACTION_ID_YES() = -8`

Id of standard Yes action.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#CHECKBOX_CHECK_SET_ID() = -1`

Checkset Id for checkbox.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#DEFAULT_CHECK_SET_ID() = 1`

Default checkset Id for radio.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET() = 0`

Special check set Id that is neither checkbox nor radio.

### Inherited functions

From [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#addKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Adds a keycode used to invoke this Action.
`https://developer.android.com/reference/android/graphics/drawable/Drawable.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getIcon()()`

Returns the icon drawable for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getId()()`

Returns the id for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel1()()`

Returns the first line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel2()()`

Returns the second line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#removeKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Removes a keycode used to invoke this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#respondsToKeyCode(int)(keyCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns true if the Action should respond to the given keycode.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setIcon(android.graphics.drawable.Drawable)(icon: https://developer.android.com/reference/android/graphics/drawable/Drawable.html?)`

Sets the icon drawable for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setId(long)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Sets the id for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel1(java.lang.CharSequence)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the first line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel2(java.lang.CharSequence)(label: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the second line label for this Action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#toString()()` From [androidx.leanback.widget.GuidedAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getAutofillHints()()`

Returns autofill hints, see `https://developer.android.com/reference/android/view/View.html#setAutofillHints(java.lang.String...)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()()`

Returns the check set id this action is a part of.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()()`

Returns the description of this action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescriptionEditInputType()()`

Returns InputType of action description in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescriptionInputType()()`

Returns InputType of action description not in editing.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditDescription()()`

Returns the optional description text to edit.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditInputType()()`

Returns InputType of action title in editing; only valid when `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()()`

Returns the optional title text to edit.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getInputType()()`

Returns InputType of action title not in editing.
`https://developer.android.com/reference/android/content/Intent.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getIntent()()`

Returns the intent associated with this action.
`(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction!>?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getSubActions()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()()`

Returns the title of this action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasEditableActivatorView()()`

Returns whether this action can be activated to edit, e.g. a DatePicker.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasMultilineDescription()()`

Returns whether this action is has a multiline description.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasNext()()`

Returns whether this action will request further user input when selected, such as showing another GuidedStepFragment or launching a new activity.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasSubActions()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#hasTextEditable()()`

Returns if this action has editable title or editable description.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#infoOnly()()`

Returns whether the action will only display information and is thus not clickable.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isAutoSaveRestoreEnabled()()`

Returns true if Action will be saved to instanceState and restored later, false otherwise.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()()`

Returns whether this action is checked.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()()`

Returns whether this action description is editable.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditTitleUsed()()`

Returns true if `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getEditTitle()` is not null.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()()`

Returns whether this action title is editable.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEnabled()()`

Returns whether this action is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isFocusable()()`

Returns whether this action is focusable.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setChecked(boolean)(checked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets whether this action is checked.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)(description: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the description of this action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEditDescription(java.lang.CharSequence)(editDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the optional description text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setDescription(java.lang.CharSequence)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEditTitle(java.lang.CharSequence)(editTitle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the optional title text to edit instead of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setEnabled(boolean)(enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets whether this action is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setFocusable(boolean)(focusable: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets whether this action is focusable.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setIntent(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html?)`

Sets the intent of this action.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setSubActions(java.util.List<androidx.leanback.widget.GuidedAction>)(actions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction!>?)`

Change sub actions list.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#setTitle(java.lang.CharSequence)(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)`

Sets the title of this action.

## Public constructors

### GuidedDatePickerAction

Added in 1.1.0

```
GuidedDatePickerAction()
```

## Public functions

### getDate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getDate(): Long
```

Get current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Current value of DatePicker Action. |

### getDatePickerFormat

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getDatePickerFormat(): String?
```

Returns format of date Picker or null if not specified. The format is a case insensitive String containing the \* day ('d'), month ('m'), and year ('y'). When the format is not specified, a default format of current locale will be used.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | Format of showing Date, e.g. "YMD". Returns null if using current locale's default. |

### getMaxDate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getMaxDate(): Long
```

Get maximum value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Maximum value of DatePicker Action or Long.MAX_VALUE if not set. |

### getMinDate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun getMinDate(): Long
```

Get minimal value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone. -1 if not set.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Minimal value of DatePicker Action or Long.MIN_VALUE if not set. |

### onRestoreInstanceState

```
fun onRestoreInstanceState(bundle: Bundle, key: String?): Unit
```

Restore action from a bundle using a given key. When isAutoRestore() is true:

- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` will be saved

Subclass may override this method.

| Parameters |
|---|---|
| `bundle: https://developer.android.com/reference/android/os/Bundle.html` | Bundle to restore the Action from. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | Key used to restore the Action. |

### onSaveInstanceState

```
fun onSaveInstanceState(bundle: Bundle, key: String?): Unit
```

Save action into a bundle using a given key. When isAutoRestoreEna() is true:

- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getTitle()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isDescriptionEditable()` is true: save text of `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getDescription()`
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#getCheckSetId()` is not `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#NO_CHECK_SET()`: save `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedAction#isChecked()`}
- `https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedDatePickerAction` will be saved

Subclass may override this method.

| Parameters |
|---|---|
| `bundle: https://developer.android.com/reference/android/os/Bundle.html` | Bundle to save the Action. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | Key used to save the Action. |

### setDate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
fun setDate(date: Long): Unit
```

Sets current value of DatePicker in milliseconds since January 1, 1970 00:00:00 in `https://developer.android.com/reference/java/util/TimeZone.html#getDefault()` time zone.

| Parameters |
|---|---|
| `date: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | New value to update current value of DatePicker Action. |