Struct google_api_proto::google::apps::card::v1::DateTimePicker
source · pub struct DateTimePicker {
pub name: String,
pub label: String,
pub type: i32,
pub value_ms_epoch: i64,
pub timezone_offset_date: i32,
pub on_change_action: Option<Action>,
}
Expand description
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.
Fields§
§name: 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.
label: 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
or Appointment date and time
.
type: i32
Whether the widget supports inputting a date, a time, or the date and time.
value_ms_epoch: i64
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
).
timezone_offset_date: i32
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.
on_change_action: Option<Action>
Triggered when the user clicks Save or Clear from the
DateTimePicker
interface.
Implementations§
source§impl DateTimePicker
impl DateTimePicker
sourcepub fn type(&self) -> DateTimePickerType
pub fn type(&self) -> DateTimePickerType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_type(&mut self, value: DateTimePickerType)
pub fn set_type(&mut self, value: DateTimePickerType)
Sets type
to the provided enum value.
Trait Implementations§
source§impl Clone for DateTimePicker
impl Clone for DateTimePicker
source§fn clone(&self) -> DateTimePicker
fn clone(&self) -> DateTimePicker
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DateTimePicker
impl Debug for DateTimePicker
source§impl Default for DateTimePicker
impl Default for DateTimePicker
source§impl Message for DateTimePicker
impl Message for DateTimePicker
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for DateTimePicker
impl PartialEq for DateTimePicker
source§fn eq(&self, other: &DateTimePicker) -> bool
fn eq(&self, other: &DateTimePicker) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DateTimePicker
Auto Trait Implementations§
impl Freeze for DateTimePicker
impl RefUnwindSafe for DateTimePicker
impl Send for DateTimePicker
impl Sync for DateTimePicker
impl Unpin for DateTimePicker
impl UnwindSafe for DateTimePicker
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request