0.1.5 • Published 7 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
7 months ago
0.1.4
7 months ago
0.1.3
7 months ago
0.1.2
7 months ago
0.1.1
7 months ago
1.0.24
7 months ago
1.0.23
7 months ago
1.0.22
7 months ago
1.0.21
7 months ago
1.0.20
7 months ago
1.0.19
7 months ago
1.0.18
7 months ago
1.0.17
7 months ago
1.0.15
7 months ago
1.0.14
7 months ago
1.0.13
7 months ago
1.0.12
7 months ago
1.0.11
7 months ago
1.0.10
7 months ago
1.0.9
7 months ago
1.0.8
7 months ago
1.0.7
7 months ago
1.0.6
7 months ago
1.0.5
7 months ago
1.0.4
7 months ago
1.0.3
7 months ago
1.0.2
7 months ago
1.0.1
7 months ago