# Interface DateTimePickerOrBuilder (2.72.0)

2.72.0 (latest) 2.70.0 2.67.0 2.66.0 2.65.1 2.64.1 2.63.2 2.62.0 2.61.3 2.60.0 2.59.2 2.58.0 2.57.0 2.56.0 2.54.1 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.0 2.46.0 2.45.1 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.39.1 2.38.0 2.37.1 2.36.0 2.34.0 2.33.0 2.32.0 2.30.0 2.29.0 2.28.0 2.27.0 2.26.0 2.25.1 2.24.0 2.23.1 2.22.1 2.21.1 2.15.0 2.14.3 2.13.0 2.12.0 2.11.0 2.10.0 2.9.6 2.8.4 2.7.4

    public interface DateTimePickerOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getLabel()

    public abstract String getLabel()

The text that prompts users to input a date, a time, or a date and time.
For example, if users are scheduling an appointment, use a label such as
`Appointment date` or `Appointment date and time`.

`string label = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The label. |

### getLabelBytes()

    public abstract ByteString getLabelBytes()

The text that prompts users to input a date, a time, or a date and time.
For example, if users are scheduling an appointment, use a label such as
`Appointment date` or `Appointment date and time`.

`string label = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for label. |

### getName()

    public abstract String getName()

The name by which the `DateTimePicker` is identified in a form input event.

For details about working with form inputs, see [Receive form
data](https://developers.google.com/workspace/chat/read-form-data).

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

The name by which the `DateTimePicker` is identified in a form input event.

For details about working with form inputs, see [Receive form
data](https://developers.google.com/workspace/chat/read-form-data).

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getOnChangeAction()

    public abstract Action getOnChangeAction()

Triggered when the user clicks **Save** or **Clear** from the
`DateTimePicker` interface.

`.google.apps.card.v1.Action on_change_action = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.Action` | The onChangeAction. |

### getOnChangeActionOrBuilder()

    public abstract ActionOrBuilder getOnChangeActionOrBuilder()

Triggered when the user clicks **Save** or **Clear** from the
`DateTimePicker` interface.

`.google.apps.card.v1.Action on_change_action = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.ActionOrBuilder` |   |

### getTimezoneOffsetDate()

    public abstract int getTimezoneOffsetDate()

The number representing the time zone offset from UTC, in minutes.
If set, the `value_ms_epoch` is displayed in the specified time zone.
If unset, the value defaults to the user's time zone setting.

`int32 timezone_offset_date = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The timezoneOffsetDate. |

### getType()

    public abstract DateTimePicker.DateTimePickerType getType()

Whether the widget supports inputting a date, a time, or the date and time.

`.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/proto-google-common-protos/latest/com.google.apps.card.v1.DateTimePicker.DateTimePickerType` | The type. |

### getTypeValue()

    public abstract int getTypeValue()

Whether the widget supports inputting a date, a time, or the date and time.

`.google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for type. |

### getValueMsEpoch()

    public abstract long getValueMsEpoch()

Optional. The default value displayed in the widget, in milliseconds since
[Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).

Specify the value based on the type of picker (`DateTimePickerType`):

- `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
- `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`.
- `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).

`optional int64 value_ms_epoch = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The valueMsEpoch. |

### hasOnChangeAction()

    public abstract boolean hasOnChangeAction()

Triggered when the user clicks **Save** or **Clear** from the
`DateTimePicker` interface.

`.google.apps.card.v1.Action on_change_action = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the onChangeAction field is set. |

### hasValueMsEpoch()

    public abstract boolean hasValueMsEpoch()

Optional. The default value displayed in the widget, in milliseconds since
[Unix epoch time](https://en.wikipedia.org/wiki/Unix_time).

Specify the value based on the type of picker (`DateTimePickerType`):

- `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`.
- `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`.
- `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).

`optional int64 value_ms_epoch = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the valueMsEpoch field is set. |