0.1.5 • Published 7 years ago

uxcore-time-picker v0.1.5

Weekly downloads
18
License
MIT
Repository
github
Last release
7 years ago

uxcore-time-picker

React time picker using rc-time-picker

NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

Development

git clone https://github.com/uxcore/uxcore-time-picker
cd uxcore-time-picker
npm install
npm run server

if you'd like to save your install time,you can use uxcore-tools globally.

npm install uxcore-tools -g
git clone https://github.com/uxcore/uxcore-time-picker
cd uxcore-time-picker
npm install
npm run dep
npm run start

Test Case

npm run test

Coverage

npm run coverage

Demo

http://uxcore.github.io/components/time-picker

Contribute

Yes please! See the CONTRIBUTING for details.

API

Props

NameTypeRequiredDefaultComments
clearTextStringNo'clear'清除按钮的文字提示
disabledBooleanNofalse是否禁用
allowEmptyBooleanNotrue允许清空
openBooleanNofalse当前下拉展开的状态,受控属性
defaultValuemomentNonull默认初始值,非受控属性
defaultOpenValuemomentNomoment()默认面板值,用于没有设置 value/defaultValue 时,设置时区、语言
valuemomentNonull当前值
placeholderStringNo''输入框占位符
classNameStringNo''触发区域的 className
idStringNo''触发区域的 id
popupClassNameStringNo''面板的 className
showHourBooleanNotrue是否显示小时
showMinuteBooleanNotrue是否显示分钟
showSecondBooleanNotrue是否显示秒
formatStringNo-moment format
disabledHoursFunctionNo-禁用小时回调
disabledMinutesFunctionNo-禁用分钟回调
disabledSecondsFunctionNo-禁用秒回调
use12HoursBooleanNofalse12 小时显示模式
hideDisabledOptionsBooleanNofalse是否隐藏被禁用的选项
onChangeFunctionNonull选择不同的值触发
addonFunctionNo-面板的渲染回调,用于在面板底部渲染一些其他元素,例如确认按钮,接受 panel 实例作为参数,可以使用 panel.close() 来关闭 panel
placementStringNobottomLeftone of 'left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'
transitionNameStringNo''
nameStringNo-设置输入框的 name 属性
onOpenFunction({ open })No在面板展开时调用
onCloseFunction({ open })No在面板收起时调用
hourStepNumberNo1小时选项间隔
minuteStepNumberNo1分钟选项间隔
secondStepNumberNo1秒选项间隔
focusOnOpenBooleanNofalse面板展开时自动聚焦到输入框
inputReadOnlyBooleanNofalse输入框只读