0.3.0 ⢠Published 1 year ago
ios-react-time-picker v0.3.0
ios-react-time-picker
ios style time picker for React app š.
install
npm i ios-react-time-picker
how to use
import React, { useState } from 'react';
import { TimePicker } from 'ios-react-time-picker';
export default const MyApp = () => {
const [value, setValue] = useState('10:00');
const onChange = (timeValue) => {
setValue(timeValue);
}
return (
<div>
<TimePicker value={value} onChange={onChange} hourType={12} minType={1} />
</div>
);
}
Example
default | 12-hour | 24-hour |
---|---|---|
1-minutes | 5-minutes | 10-minutes |
---|---|---|
API
Name | Type | Default | Description |
---|---|---|---|
value | string | N/A | The current selected time in string format. |
onChange | Dispatch<SetStateAction<string>> | N/A | Function called when the time value changes. |
hourType | 12 \| 24 | 24 | Determines whether to use a 12-hour or 24-hour format for the time display. |
minType | 1 \| 5 \| 10 | 1 | Interval for minutes, allowing 1, 5, or 10-minute increments. |
License
The MIT License.
0.3.0
1 year ago
0.2.33
1 year ago
0.2.22
1 year ago
0.2.21
1 year ago
0.2.12
1 year ago
0.2.2
1 year ago
0.2.1
1 year ago
0.2.0
1 year ago
0.1.34
1 year ago
0.1.33
1 year ago
0.1.32
1 year ago
0.1.31
1 year ago
0.1.22
1 year ago
0.1.21
1 year ago
0.1.20
1 year ago
0.1.17
1 year ago
0.1.16
1 year ago
0.1.15
1 year ago
0.1.14
1 year ago
0.1.13
1 year ago
0.1.12
1 year ago
0.1.11
1 year ago
0.1.10
1 year ago
0.1.9
1 year ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago