Skip to content

DateField

A segmented, keyboard-editable date field with locale-aware date parts.

Loading interactive demo…

#Import

Import DateField from quickgui.

use quickgui::*;

#Usage

let field = DateField::new("start");
field.root().flex_row()

#Anatomy

  • DateField::root
  • DateField::segment

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

DateField

View source
pub fn new(root_id: impl Into<ElementId>) -> Self
root_idpub const fn root_id(self) -> ElementId—

Configures root id for this part.

pub const fn root_id(self) -> ElementId
View source
segment_idpub fn segment_id(self, segment: DateSegment) -> ElementId—

Configures segment id for this part.

pub fn segment_id(self, segment: DateSegment) -> ElementId
View source
segmentpub const fn segment(self, segment: DateSegment) -> DateFieldSegment—

Describe one segment so its part and typed actions can be attached.

pub const fn segment(self, segment: DateSegment) -> DateFieldSegment
View source

DateField::root_with

View source
pub fn root_with(self, state: &DateFieldState, root: Element) -> Element

Decorate an application-owned root without adding layout or appearance. The root is the group that owns the field's accessible name, its disabled state, its validity, and the active-descendant relationship to the segment being edited.

DateField::root

View source
pub fn root(self, state: &DateFieldState) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.