TimePicker
It is based on the react-datepicker library. Note: Pass a value of null
if you don't want the default value of Date.now()
.
Install and import
Simple use case
Add an icon on the right
Pass props to TimePicker
Properties
Name | Type(s) | Default | Required |
---|---|---|---|
autoFocus | bool | ||
dateFormat | string | HH:mm | |
disabled | bool | ||
icon | union | ||
iconPlacement | right left | left | |
inputRef | func | ||
onBlur | func | ||
onChange | func | ||
onFocus | func | ||
placeholder | string | ||
popperProps | object | ||
size | sm md lg | lg | |
timeIntervals | number | 15 | |
value | number | object | string | DEFAULT_DATE |
Dependencies
- - @welcome-ui/date-time-picker-common^3.4.0
- - @welcome-ui/system^3.0.0
- - @welcome-ui/utils^3.0.0
- - react-datepicker^3.6.0
Peer dependencies
- - @xstyled/styled-components^2.2.3
- - prop-types^15.7.2
- - react^16.10.2 || ^17.0.1
- - react-dom^16.10.2 || ^17.0.1
- - styled-components^5.2.1