@paprika/time-picker
v5.0.1
Published
The TimePicker component gives users the ability to select a specific time from a popover.
Downloads
178
Keywords
Readme
@paprika/time-picker
Description
The TimePicker component gives users the ability to select a specific time from a popover.
Installation
yarn add @paprika/time-picker
or with npm:
npm install @paprika/time-picker
Props
TimePicker
| Prop | Type | required | default | Description | | ------------- | ------ | -------- | -------------- | -------------------------------------------------- | | a11yText | string | false | "Time (hh:mm)" | Descriptive a11y text for assistive technologies. | | defaultIsOpen | bool | false | false | If the TimePicker is set to visible. | | defaultValue | string | false | null | Sets the default value for the TimePicker | | isDisabled | bool | false | false | If the TimePicker is disabled. | | isReadOnly | bool | false | false | Should be read-only or not, default is false. | | onChange | func | false | () => {} | Callback to be executed when the value is changed. | | onError | func | false | () => {} | Callback to be executed when there is an error. |
TimePicker
The TimePicker component gives users the ability to select a specific time from a popover.
Usage
To create a TimePicker simply add the <TimePicker />
component. You can set the default value of the picker and whether to display the dropdown displaying the time selection options by adding the properties to the the TimePicker.
<TimePicker defaultValue="6am" isVisible />