Class: Google::Apps::Card::V1::DateTimePicker

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/apps/card/v1/card.rb

Overview

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:

Defined Under Namespace

Modules: DateTimePickerType

Instance Attribute Summary collapse

Instance Attribute Details

#label::String

Returns 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.

Returns:

  • (::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.



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end

#name::String

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

For details about working with form inputs, see Receive form data.

Returns:

  • (::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.



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end

#on_change_action::Google::Apps::Card::V1::Action

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

Returns:



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end

#timezone_offset_date::Integer

Returns 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.

Returns:

  • (::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.



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end

#type::Google::Apps::Card::V1::DateTimePicker::DateTimePickerType

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

Returns:



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end

#value_ms_epoch::Integer

Returns 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).

Returns:

  • (::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, 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).


1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'proto_docs/google/apps/card/v1/card.rb', line 1267

class DateTimePicker
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The format for the date and time in the `DateTimePicker` widget.
  # Determines whether users can input a date, a time, or both a date and time.
  #
  # [Google Workspace Add-ons and Chat
  # apps](https://developers.google.com/workspace/extend):
  module DateTimePickerType
    # Users input a date and time.
    DATE_AND_TIME = 0

    # Users input a date.
    DATE_ONLY = 1

    # Users input a time.
    TIME_ONLY = 2
  end
end