@rax-ui/date-picker
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.62 • Public • Published

display: Date Picker family: Form

DatePicker

用于选择日期或者时间

API

Props

名称 说明 类型 默认值
type 类型
可选值:
date, time, dateime, year, month
enum date
maxDate 最大时间 Date;
maxDate 可选的最大日期 Date new Date(new Date().getFullYear() + 20, 11, 31, 23, 59, 59, 999)
minDate 可选的最小日期 Date new Date(2000, 0, 1, 0, 0, 0, 0)
use12Hours 是否使用 12 小时制 bool false
selectSecond 是否可以选择秒 bool false
format 时间格式化显示, 格式化函数基于 dayjs 实现 string/func getDefaultFormat
label 选择框文本 node
labelWidth label 宽度 string auto
actionIcon 选择框右侧的图标 node 'dropdown-down'
value 选择框的值(受控) Date
defaultValue 选择框的值(非受控) Date
disabled 是否被禁用 bool false
solo 是否只显示选择框内容(不包含 label 和 errorText 、HelpText) bool false
outline 是否显示边框 bool false
placeholder 选择框的提示文案 string
helpText 选择框底部的帮助文案 node
errorText 选择框底部的错误文案(设置此项后,选择框变为 error 状态,helpText 无效) node
align 选择框内容对齐方向
可选值:
leftcenterright
enum left
prepend 选择框的前置内容 node
append 选择框的后置内容 node
clear 是否可以被清除 bool false
title 选择器的标题文案 string
renderSelection 渲染已选择的内容 (value: any, valueLabel: any) => RaxNode
onChange 选择之后的回调 (value: Date): void
onFocus focus 事件的回调 ():void
onBlur blur 事件的回调 ():void
onShow 选择器打开时的回调 ():void
onHide 选择器关闭时的回调 ():void

CSS API

Select CSS

Readme

Keywords

Package Sidebar

Install

npm i @rax-ui/date-picker

Weekly Downloads

51

Version

1.0.0-beta.62

License

none

Unpacked Size

45.9 kB

Total Files

14

Last publish

Collaborators

  • lianmin
  • amdgigabyte
  • myronliu347