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