input-moment-ex

0.5.7 • Public • Published

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

License

ISC

Package Sidebar

Install

npm i input-moment-ex

Weekly Downloads

2

Version

0.5.7

License

ISC

Last publish

Collaborators

  • aikar