Skip to content

React datetime picker powered by momentjs

License

Notifications You must be signed in to change notification settings

prometheusresearch-archive/react-input-moment

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

input-moment

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.

Usage

<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.

Development

Work Left To Do

  • Get rid of LESS/CSS in favor of using react-stylesheet.
  • ES6-ify the code.

License

ISC

About

React datetime picker powered by momentjs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.0%
  • CSS 9.9%
  • HTML 2.1%