react-time-input v1.1.1
Contributor: Dima Bukhal - dimabuhal@gmail.com Collaborators: Dima Bukhal - dimabuhal@gmail.com, arthurvi (https://github.com/arthurvi, https://www.npmjs.com/~arthurvi)
If you want be contributors or collaborators - write me on dimabuhal@gmail.com with the theme 'react-time-input IMPORTANT'
What's in it?
A simple react component for select time in format HH:mm timeInput.jsx Its used webpack for building and es6 syntax
Basic Usage
npm install react-time-input --saveconst TimeWrapper = () => {
const onFocusHandler = (event) => {
console.log("hello there you entered : my name is ", event.target.name);
}
const onBlurHandler = (event) => {
console.log("you left ");
}
const onTimeChangeHandler = (val) => {
if (val.length === 5) {
// do something with this value
}
}
return (
<TimeInput
name="example"
initTime='11:12'
className='s-input -time'
mountFocus='true'
onTimeChange={onTimeChangeHandler}
onFocusHandler={onFocusHandler}
onBlurHandler={onBlurHandler}
/>
);
}
function App() {
return (
<TimeWrapper/>
);
}
ReactDOM.render(<App/>, document.querySelector("#myApp"));To run
> $ git clone https://github.com/dima-bu/react-time-input.gitThen install the dependencies:
npm installYou can simply run webpack example build using this command:
npm run exampleOpen in the web browser file ./example/index.html
Create build
npm run buildPlease contribute to the project if you think this can be done better in any way even for this README :)
2 years ago
5 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago