Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::DateTimePicker.
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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#label
def label() -> ::String
-
(::String) — 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
orAppointment date and time
.
#label=
def label=(value) -> ::String
-
value (::String) — 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
orAppointment date and time
.
-
(::String) — 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
orAppointment date and time
.
#name
def name() -> ::String
-
(::String) — The name by which the
DateTimePicker
is identified in a form input event.For details about working with form inputs, see Receive form data.
#name=
def name=(value) -> ::String
-
value (::String) — 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) — The name by which the
DateTimePicker
is identified in a form input event.For details about working with form inputs, see Receive form data.
#on_change_action
def on_change_action() -> ::Google::Apps::Card::V1::Action
-
(::Google::Apps::Card::V1::Action) — Triggered when the user clicks Save or Clear from the
DateTimePicker
interface.
#on_change_action=
def on_change_action=(value) -> ::Google::Apps::Card::V1::Action
-
value (::Google::Apps::Card::V1::Action) — Triggered when the user clicks Save or Clear from the
DateTimePicker
interface.
-
(::Google::Apps::Card::V1::Action) — Triggered when the user clicks Save or Clear from the
DateTimePicker
interface.
#timezone_offset_date
def timezone_offset_date() -> ::Integer
-
(::Integer) — 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.
#timezone_offset_date=
def timezone_offset_date=(value) -> ::Integer
-
value (::Integer) — 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.
-
(::Integer) — 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.
#type
def type() -> ::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType
- (::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType) — Whether the widget supports inputting a date, a time, or the date and time.
#type=
def type=(value) -> ::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType
- value (::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType) — Whether the widget supports inputting a date, a time, or the date and time.
- (::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType) — Whether the widget supports inputting a date, a time, or the date and time.
#value_ms_epoch
def value_ms_epoch() -> ::Integer
-
(::Integer) —
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, use1672574400000
.DATE_ONLY
: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use1672531200000
.TIME_ONLY
: a time in UTC. For example, to represent 12:00 PM, use43200000
(or12 * 60 * 60 * 1000
).
#value_ms_epoch=
def value_ms_epoch=(value) -> ::Integer
-
value (::Integer) —
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, use1672574400000
.DATE_ONLY
: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use1672531200000
.TIME_ONLY
: a time in UTC. For example, to represent 12:00 PM, use43200000
(or12 * 60 * 60 * 1000
).
-
(::Integer) —
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, use1672574400000
.DATE_ONLY
: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use1672531200000
.TIME_ONLY
: a time in UTC. For example, to represent 12:00 PM, use43200000
(or12 * 60 * 60 * 1000
).