0.1.5 • Published 10 months ago
react-time-picker-roll v0.1.5
React time picker roll
A Simple time picker roll for React or Next app.
install
npm install react-time-picker-roll
Usage
import React, { useState } from 'react';
import { TimePickerComponent } from 'my-time-picker';
export default const MyApp = () => {
// initialTime
const [value, setValue] = useState({ hours: 6, minutes: 0, period: 'AM' });
// onChange
const handleTimeChange = (time: {
hours: number;
minutes: number;
period: string;
}) => {
console.log(time);
setValue(time)
};
return (
<div>
<TimePickerComponent
initialTime={value}
onChange={handleTimeChange} />
<p>Selected Time: {value} </p>
</div>
);
}
API
Name | Type | Default | Description |
---|---|---|---|
value | String | n/a | Current value. |
name | String | n/a | Input time picker name |
onChange | (value) => alert('New time is:', value) | n/a | Called when select a different value |
License
The MIT License.
0.1.5
10 months ago
0.1.4
10 months ago
0.1.3
10 months ago
0.1.2
10 months ago
0.1.1
10 months ago
1.0.24
10 months ago
1.0.23
10 months ago
1.0.22
10 months ago
1.0.21
10 months ago
1.0.20
10 months ago
1.0.19
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.13
10 months ago
1.0.12
10 months ago
1.0.11
10 months ago
1.0.10
10 months ago
1.0.9
10 months ago
1.0.8
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
10 months ago