Skip to content

TimePicker 时间选择器

规则

基础示例

时间区间

整段禁用

尺寸对比(小 / 中 / 大)

Events

参考:Antdv Next TimePicker

valuestring | [string, string]

Props

参数说明类型默认值版本
allowClear清除按钮boolean |true5.8.0 起支持对象
cellRender自定义单元格function-5.4.0
changeOnScroll滚动改变值booleanfalse5.14.0
classes语义化 classRecord<SemanticDOM, string> | function--
defaultValue默认时间dayjs--
disabled禁用booleanfalse-
disabledTime不可选时间DisabledTime-4.19.0
format展示格式stringHH:mm:ss-
valueFormat绑定值格式string--
getPopupContainer浮层容器function(trigger)--
hideDisabledOptions隐藏禁用项booleanfalse-
hourStep小时间隔number1-
inputReadOnly输入框只读booleanfalse-
minuteStep分钟间隔number1-
needConfirm是否需要确认boolean-5.14.0
open面板打开booleanfalse-
placeholder占位string | [string, string]请选择时间-
placement弹出位置见文档bottomLeft-
popupClassName已废弃,用 classes.popupstring--
popupStyle已废弃,用 styles.popupobject--
prefix前缀VueNode-5.22.0
previewValue悬停预览输入值false | hoverhover6.0.0
renderExtraFooter底部自定义() => VueNode--
secondStep秒间隔number1-
showNow显示「此刻」boolean-4.4.0
size尺寸large | middle | small--
status校验状态error | warning-4.19.0
styles语义化 styleRecord<SemanticDOM, CSSProperties> | function--
suffixIcon后缀图标VueNode--
use12Hours12 小时制booleanfalse-
value当前时间dayjs--
variant形态变体outlined | borderless | filled | underlinedoutlined5.13.0

Events

事件说明类型版本
change时间变化(time: dayjs, timeString: string) => void-
openChange面板开关(open: boolean) => void-

FormCreate 是一个开源项目,基于 MIT 许可证发布,欢迎个人和企业用户免费使用