DateField
可通过键盘编辑的分段日期字段,日期部分会适配区域设置。
正在加载交互演示…
let field = DateField::new("start");
field.root().flex_row()#导入
从 quickgui 导入 DateField。
use quickgui::*;#用法
let field = DateField::new("start");
field.root().flex_row()#结构
DateField::rootDateField::segment
#API 参考
展开条目查看说明和完整签名。短横线表示声明中未记录默认值。
DateField
查看源码pub fn new(root_id: impl Into<ElementId>) -> Selfroot_idpub const fn root_id(self) -> ElementId—
segment_idpub 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) -> ElementDecorate 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) -> ElementCreate the unstyled root part. Use [`Self::root_with`] to supply an existing element.
