Send feedback
Class DateTimePicker (2.50.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public final class DateTimePicker extends GeneratedMessageV3 implements DateTimePickerOrBuilder
Lets users input a date, a time, or both a date and a time. For an example in
Google Chat apps, see Let a user pick a date and
time .
Users can input text or use the picker to select dates and times. If users
input an invalid date or time, the picker shows an error that prompts users
to input the information correctly.
Google Workspace
Add-ons and Chat apps :
Protobuf type google.apps.card.v1.DateTimePicker
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
LABEL_FIELD_NUMBER
public static final int LABEL_FIELD_NUMBER
Field Value
Type
Description
int
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
Type
Description
int
ON_CHANGE_ACTION_FIELD_NUMBER
public static final int ON_CHANGE_ACTION_FIELD_NUMBER
Field Value
Type
Description
int
TIMEZONE_OFFSET_DATE_FIELD_NUMBER
public static final int TIMEZONE_OFFSET_DATE_FIELD_NUMBER
Field Value
Type
Description
int
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value
Type
Description
int
VALUE_MS_EPOCH_FIELD_NUMBER
public static final int VALUE_MS_EPOCH_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static DateTimePicker getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static DateTimePicker . Builder newBuilder ()
newBuilder(DateTimePicker prototype)
public static DateTimePicker . Builder newBuilder ( DateTimePicker prototype )
public static DateTimePicker parseDelimitedFrom ( InputStream input )
public static DateTimePicker parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static DateTimePicker parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static DateTimePicker parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static DateTimePicker parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static DateTimePicker parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static DateTimePicker parseFrom ( CodedInputStream input )
public static DateTimePicker parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static DateTimePicker parseFrom ( InputStream input )
public static DateTimePicker parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static DateTimePicker parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static DateTimePicker parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<DateTimePicker> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public DateTimePicker getDefaultInstanceForType ()
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
String
The label.
getLabelBytes()
public 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
ByteString
The bytes for label.
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 .
string name = 1;
Returns
Type
Description
String
The name.
getNameBytes()
public 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 .
string name = 1;
Returns
Type
Description
ByteString
The bytes for name.
getOnChangeAction()
public 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
Action
The onChangeAction.
getOnChangeActionOrBuilder()
public ActionOrBuilder getOnChangeActionOrBuilder ()
Triggered when the user clicks Save or Clear from the
DateTimePicker
interface.
.google.apps.card.v1.Action on_change_action = 6;
getParserForType()
public Parser<DateTimePicker> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
getTimezoneOffsetDate()
public 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
int
The timezoneOffsetDate.
getType()
public 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;
getTypeValue()
public 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
int
The enum numeric value on the wire for type.
getValueMsEpoch()
public long getValueMsEpoch ()
The default value displayed in the widget, in milliseconds since Unix
epoch 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
).
int64 value_ms_epoch = 4;
Returns
Type
Description
long
The valueMsEpoch.
hasOnChangeAction()
public 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
boolean
Whether the onChangeAction field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public DateTimePicker . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected DateTimePicker . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public DateTimePicker . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]