THIS IS A FORK OF input-moment USED AT HIVEBEAT
React datetime picker powered by momentjs
The design is from https://dribbble.com/shots/1439965-Due-Date-and-Time-Picker.
The icon is from ionicons.
npm i hb-input-moment --save
Notice: This module requires moment as a peerDependency.
http://wangzuo.github.io/input-moment
<InputMoment
moment={this.state.moment}
onChange={this.handleChange}
onSave={this.handleSave}
/>
Prop | Description | Default |
---|---|---|
dateOnly | Boolean. If it should show only the date picker. | false |
timeOnly | Boolean. If it should show only the time picker. | false |
prevMonthIcon | String. Class string for the previous month icon. | 'ion-ios-arrow-left' |
nextMonthIcon | String. Class string for the next month icon. | 'ion-ios-arrow-right' |
weeks | Array. Days of the week in order. | ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] |
locale | String. Locale to display date time in. | 'en' |
saveString | String. String so display on the save button. | 'Save' |
Check app.js for a working example.
- npm install
- npm start
- http://localhost:8888
ISC