本文へスキップ

DateField

ロケールに応じた日付パーツを持つ、キーボード編集可能な分割日付フィールドです。

デモを読み込み中…

#インポート

quickgui から DateField をインポートします。

use quickgui::*;

#使い方

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

#構成

  • DateField::root
  • DateField::segment

#API リファレンス

項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。

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
ソースを見る
segment_idpub fn segment_id(self, segment: DateSegment) -> ElementId—

Configures segment id for this part.

pub fn segment_id(self, segment: DateSegment) -> ElementId
ソースを見る
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
ソースを見る

DateField::root_with

ソースを見る
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

ソースを見る
pub fn root(self, state: &DateFieldState) -> Element

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