React Ios Time Picker
A modern way to pick time
Install
npm install react-ios-time-picker
Usage
24 hours format usage
import React, { useState } from 'react';
import { TimePicker } from 'react-ios-time-picker';
export default const MyApp = () => {
const [value, setValue] = useState('10:00');
const onChange = (timeValue) => {
setValue(timeValue);
}
return (
<div>
<TimePicker onChange={onChange} value={value} />
</div>
);
}
12 hours format usage
import React, { useState } from 'react';
import { TimePicker } from 'react-ios-time-picker';
export default const MyApp = () => {
const [value, setValue] = useState('10:00 AM');
const onChange = (timeValue) => {
setValue(timeValue);
}
return (
<div>
<TimePicker onChange={onChange} value={value} use12Hours/>
</div>
);
}
Contributions Welcome!
git clone https://github.com/MEddarhri/react-ios-time-picker
cd react-ios-time-picker
Issues
If you have any questions, suggestions for enhancements, or if you find any bugs, please raise them on the repo:
https://github.com/MEddarhri/react-ios-time-picker/issues
Top comments (2)
12 hours format usage not work return error => TypeError: Cannot read properties of undefined (reading 'translatedValue')
12 hours format usage
not work return error => TypeError: Cannot read properties of undefined (reading 'translatedValue')