A2uiBasicCatalogV1.DateTimeInput

interface A2uiBasicCatalogV1.DateTimeInput : A2uiComponent


The A2UI "DateTimeInput" component for selecting date and/or time.

Schema Properties:

  • accessibility (Dynamic Custom, optional): Accessibility attributes for the date/time input.

  • weight (Number, optional): The relative weight of the component within a Row or Column. May only be set when the component is a direct descendant of a Row or Column. See WeightProperty.

  • checks (Dynamic Custom, optional): Client-side check validation rules for the date/time input. See CheckRule.

  • value (Dynamic String, required): The selected date and/or time value in ISO 8601 format. If not yet set, initialize with an empty string.

  • enableDate (Boolean, optional): If true, allows the user to select a date. Defaults to false.

  • enableTime (Boolean, optional): If true, allows the user to select a time. Defaults to false.

  • min (Dynamic String, optional): The minimum allowed date/time in ISO 8601 format.

  • max (Dynamic String, optional): The maximum allowed date/time in ISO 8601 format.

  • label (Dynamic String, optional): The text label for the component.

Summary

Public functions

open Unit
@Composable
A2uiComponentScope.Content(
    properties: A2uiComponentProperties,
    modifier: Modifier
)

Emits the UI for this component.

Unit
@Composable
A2uiComponentScope.TypedContent(
    value: Long?,
    onValueChange: ((Long?) -> Unit)?,
    enableDate: Boolean,
    enableTime: Boolean,
    min: Long?,
    max: Long?,
    label: String?,
    accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?,
    checks: List<A2uiBasicCatalogV1.CheckRule>,
    modifier: Modifier
)

Renders the DateTimeInput with its resolved property values.

open Boolean

Determines whether this component is ready to be rendered.

Public properties

open String

A semantic description of the component's behavior and purpose.

open String

The unique string identifier for this component type (e.g., "Text", "Button").

open List<A2uiProperty<*>>

The list of typed properties expected by this component.

Public companion properties

AccessibilityProperty

Added in 1.0.0-alpha01
val AccessibilityPropertyDynamicA2uiProperty<A2uiBasicCatalogV1.AccessibilityAttributes>

The A2uiProperty for the "accessibility" property of a DateTimeInput.

ChecksProperty

Added in 1.0.0-alpha01
val ChecksPropertyDynamicA2uiProperty<List<A2uiBasicCatalogV1.CheckRule>>

The A2uiProperty for the "checks" property of a DateTimeInput. See CheckRule.

EnableDateProperty

Added in 1.0.0-alpha01
val EnableDatePropertyStaticA2uiProperty<Boolean>

The A2uiProperty for the "enableDate" property of a DateTimeInput.

EnableTimeProperty

Added in 1.0.0-alpha01
val EnableTimePropertyStaticA2uiProperty<Boolean>

The A2uiProperty for the "enableTime" property of a DateTimeInput.

LabelProperty

Added in 1.0.0-alpha01
val LabelPropertyDynamicA2uiProperty<String>

The A2uiProperty for the "label" property of a DateTimeInput.

MaxProperty

Added in 1.0.0-alpha01
val MaxPropertyDynamicA2uiProperty<String>

The A2uiProperty for the "max" property of a DateTimeInput.

MinProperty

Added in 1.0.0-alpha01
val MinPropertyDynamicA2uiProperty<String>

The A2uiProperty for the "min" property of a DateTimeInput.

ValueProperty

Added in 1.0.0-alpha01
val ValuePropertyDynamicA2uiProperty<String>

The A2uiProperty for the "value" property of a DateTimeInput.

Public functions

A2uiComponentScope.Content

@Composable
open fun A2uiComponentScope.Content(
    properties: A2uiComponentProperties,
    modifier: Modifier
): Unit

Emits the UI for this component.

This function is invoked within the A2uiComponentScope, which provides access to extensions for evaluating reactive data bindings, rendering nested children, dispatching user actions, and reporting runtime errors.

Parameters
properties: A2uiComponentProperties

The stable properties wrapper from which to extract static payloads or bind dynamic data paths.

modifier: Modifier

The Modifier applied to the root of this component's layout.

A2uiComponentScope.TypedContent

@Composable
fun A2uiComponentScope.TypedContent(
    value: Long?,
    onValueChange: ((Long?) -> Unit)?,
    enableDate: Boolean,
    enableTime: Boolean,
    min: Long?,
    max: Long?,
    label: String?,
    accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?,
    checks: List<A2uiBasicCatalogV1.CheckRule>,
    modifier: Modifier
): Unit

Renders the DateTimeInput with its resolved property values.

Parameters
value: Long?

selected date and/or time in UTC epoch milliseconds, or null if not yet set

onValueChange: ((Long?) -> Unit)?

callback invoked when the user selects a date or time in UTC epoch milliseconds, or null if the input is read-only

enableDate: Boolean

whether date selection is enabled

enableTime: Boolean

whether time selection is enabled

min: Long?

minimum allowed date/time in UTC epoch milliseconds, or null if unbounded

max: Long?

maximum allowed date/time in UTC epoch milliseconds, or null if unbounded

label: String?

text label describing the input, or null if none

accessibility: A2uiBasicCatalogV1.AccessibilityAttributes?

accessibility attributes for the date/time input

checks: List<A2uiBasicCatalogV1.CheckRule>

validation rules for this date/time input. When any CheckRule.condition is false, the input should display an error state and show the failing CheckRule.message. See CheckRule.

modifier: Modifier

Modifier to apply to the layout

A2uiComponentScope.isReady

@Composable
open fun A2uiComponentScope.isReady(properties: A2uiComponentProperties): Boolean

Determines whether this component is ready to be rendered.

This is evaluated during component state resolution to determine if the component should transition from the androidx.a2ui.compose.runtime.A2uiComponentState.Loading state to the androidx.a2ui.compose.runtime.A2uiComponentState.Success state. The readiness is automatically re-evaluated when any reactive state read in this composable function changes (such as dynamic data bindings observed via properties.bind(...)).

By default, components are considered instantly ready. Override this method to support progressive rendering—for example, returning false until a required dynamic data binding (like an image URL or text string) has been successfully resolved from the surface's data model.

Parameters
properties: A2uiComponentProperties

The stable properties wrapper provided by the A2UI protocol.

Returns
Boolean

true if the component is fully ready to be composed, false if it is still loading.

Public properties

description

open val descriptionString

A semantic description of the component's behavior and purpose.

This is included in the generated schema to help the agent understand when and how it should output this component.

name

open val nameString

The unique string identifier for this component type (e.g., "Text", "Button").

This matches the "component" field in the A2UI protocol's component payloads and is used by the framework to route incoming payloads to this specific implementation.

Note: This name must be unique within an A2uiCatalog.

properties

open val propertiesList<A2uiProperty<*>>

The list of typed properties expected by this component.

The properties serve two purposes:

  1. To automatically generate the component's JSON schema for the agent.

  2. To serve as type-safe tokens for extracting payloads or resolving dynamic data bindings from A2uiComponentProperties at runtime.