input-moment-ex
v0.5.7
Published
React datetime picker powered by momentjs - improvements by Aikar
Downloads
66
Maintainers
Readme
input-moment-ex
FORKED FROM [https://github.com/wangzuo/input-moment]
React datetime picker powered by momentjs
The design is from https://dribbble.com/shots/1439965-Due-Date-and-Time-Picker.
Changes in this version of input-moment
- Added isValid support based on [https://github.com/wangzuo/input-moment/pull/17]
- Added a sideBySide boolean property to show the time picker beside the date picker
- Changed icons to use font-awesome instead of ion.
- Updated lodash
Installation
npm i input-moment-ex --save
Notice: This module requires moment as a peerDependency.
Demo
http://aikar.github.io/input-moment
Usage
<InputMoment
moment={this.state.moment}
onChange={this.handleChange}
onSave={this.handleSave}
sideBySide
isValid={(date) => {
return date.isAfter(moment());
}}
prevMonthIcon="ion-ios-arrow-left" // default
nextMonthIcon="ion-ios-arrow-right" // default
/>
Check app.js for a working example.
Development
- npm install
- npm start
- http://localhost:8888
License
ISC