DatePickerTileSchema

@Serializable
@SerialName(value = "DatePicker")
data class DatePickerTileSchema(val id: String, val events: SerializableImmutableList<EventSchema>?, val style: StyleSchema, val searchableTerms: SerializableImmutableList<String>?, val visibility: TileSchema.Visibility, val expanded: Boolean, val selectedDate: String?, val enabled: Boolean, val kind: DatePickerTileSchema.Kind, val confirmLabel: String, val cancelLabel: String, val supportingText: String?, val state: DatePickerTileSchema.State) : TileSchema

Renders a read-only text field that opens a Material 3 DatePickerDialog when tapped. kind picks the field composable: Kind.FILLEDTextField, Kind.OUTLINEDOutlinedTextField. The field always shows a calendar_month leading icon, displays selectedDate (empty when null), forwards enabled and supportingText, and switches to Material's error styling when state is State.ERROR. Typing is impossible — the field is readOnly and its onValueChange is a no-op.

Dates are ISO strings. selectedDate is an ISO date (yyyy-MM-dd); the renderer converts it to/from epoch millis for the Compose DatePickerState.

Open state: expanded drives the dialog. Pressing the field dispatches a local DatePickerTileEvents.OnDatePickerToggle (holder flips expanded); confirming dispatches OnDateConfirmed (holder stores the date and closes); cancelling or dismissing dispatches OnDatePickerDismissRequest (holder closes). All of this is handled client-side, without a round trip to the server. The dialog's buttons are labelled with confirmLabel and cancelLabel, and the confirm button stays disabled until a date is picked, so confirming always yields a date.

Triggers dispatched:

  • OnDatePickerOpenEventTrigger — when the field is pressed while closed.

  • OnDateSelectedEventTrigger — when the confirm button is pressed; the ISO date string is passed as the event's incoming data.

  • OnDatePickerCloseEventTrigger — when the field is pressed while open, when the dialog is dismissed, when cancel is pressed, and also right after a confirm.

Value production: the holder exposes selectedDate under a caller-chosen key so GetData / EvaluateData events can read this picker by its id. When no date is selected it produces no entry at all.

Constructors

Link copied to clipboard
constructor(id: String, events: SerializableImmutableList<EventSchema>?, style: StyleSchema, searchableTerms: SerializableImmutableList<String>?, visibility: TileSchema.Visibility, expanded: Boolean, selectedDate: String?, enabled: Boolean, kind: DatePickerTileSchema.Kind, confirmLabel: String, cancelLabel: String, supportingText: String?, state: DatePickerTileSchema.State)

Types

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
@SerialName(value = "cancelLabel")
val cancelLabel: String
Link copied to clipboard
@SerialName(value = "confirmLabel")
val confirmLabel: String
Link copied to clipboard
@SerialName(value = "enabled")
val enabled: Boolean
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?
Link copied to clipboard
@SerialName(value = "expanded")
val expanded: Boolean
Link copied to clipboard
@SerialName(value = "id")
open override val id: String
Link copied to clipboard
@SerialName(value = "kind")
val kind: DatePickerTileSchema.Kind
Link copied to clipboard
@SerialName(value = "searchableTerms")
open override val searchableTerms: SerializableImmutableList<String>?
Link copied to clipboard
@SerialName(value = "selectedDate")
val selectedDate: String?
Link copied to clipboard
@SerialName(value = "state")
val state: DatePickerTileSchema.State
Link copied to clipboard
@SerialName(value = "style")
open override val style: StyleSchema
Link copied to clipboard
@SerialName(value = "supportingText")
val supportingText: String?
Link copied to clipboard
@SerialName(value = "visibility")
open override val visibility: TileSchema.Visibility

Functions

Link copied to clipboard
open fun isGone(): Boolean
Link copied to clipboard
open fun isVisible(): Boolean