时间选择器 timePicker
通过此部件调用 ZUI 的时间选择器,详细用法参考 ZUI 文档。
用法
一般用法
php
timePicker
(
set::name('time'),
set::value('12:00')
);通过 control 部件调用
php
control
(
set::name('time'),
set::value('12:00'),
set::type('time')
);通过 formGroup 部件调用
php
formGroup
(
set::name('time'),
set::value('12:00'),
set::control('picker')
);属性
| 名称 | 类型 | 可选 | 默认值 | 说明 |
|---|---|---|---|---|
id | string | ✓ | null | 组件根元素的 ID。 |
className | stringarray | ✓ | null | 类名。 |
style | array | ✓ | null | 样式。 |
tagName | string | ✓ | null | 组件根元素的标签名。 |
attrs | array | ✓ | null | 附加到组件根元素上的属性。 |
clickType | "toggle""open" | ✓ | null | 点击类型,toggle 表示点击按钮时切换显示隐藏,open 表示点击按钮时只打。 |
afterRender | function | ✓ | null | 渲染完成后的回调函数。 |
beforeDestroy | function | ✓ | null | 销毁前的回调函数。 |
name | string | ✓ | null | 作为表单项的名称。 |
defaultValue | stringstring[] | ✓ | null | 默认值。 |
onChange | function | ✓ | null | 值变更回调函数。 |
disabled | boolean | ✓ | null | 是否禁用。 |
multiple | booleannumber | ✓ | false | 是否允许选择多个值,如果指定为数字,则限制多选的数目,默认 false。 |
required | boolean | ✓ | null | 是否必选(不允许空值,不可以被清除)。 |
placeholder | string | ✓ | null | 选择框上的占位文本。 |
format | string | ✓ | null | 日期格式,默认 hh:mm。 |
icon | stringarray | ✓ | "time" | 在输入框右侧显示的图标。 |
onInvalid | function | ✓ | null | 日期值无效时的回调函数。 |