React datetime picker powered by momentjs
This is a fork of input-moment that aims to add more functionality and make less assumptions about environment.
Notice: This module requires moment as a peerDependency.
<InputMoment
moment={this.state.moment}
onChange={this.handleChange}
showSeconds={true}
locale="en"
/>
<Calendar
moment={this.state.moment}
onChange={this.handleChange}
locale="en"
/>
<Clock
moment={this.state.moment}
onChange={this.handleChange}
showSeconds={true}
locale="en"
/>
Every action the user takes in the chosen input will trigger the onChange prop. If you only want to receive one event at the completion of the picking process, there are a set of "buffered" components (BufferedInputMoment, BufferedCalendar, BufferedClock) that add a "Save" button to the input that the user must press to trigger the onChange prop.
Check app.js for a working example.
- npm install
- npm start
- http://localhost:8888
- Get rid of LESS/CSS in favor of using react-stylesheet.
- ES6-ify the code.
ISC