Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-date-time-range

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-date-time-range

[React](https://facebook.github.io/react/) Component implementing a range by wrapping two [date-time-group](https://github.com/holidayextras/react-date-time-group)s.

  • 5.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by11.76%
Maintainers
4
Weekly downloads
 
Created
Source

# react-date-time-range

React Component implementing a range by wrapping two date-time-groups.

var DateTimeRange = require('react-date-time-range');
var DateTimeGroup = require('react-date-time-group');

React.render((
  <DateTimeRange onChange={console.log.bind(console)}>
    <DateTimeGroup />
    <DateTimeGroup />
  </DateTimeRange>
), document.getElementById('container'));

Options

  • start - Date instance representing the start of the range
  • end - Date instance representing the end of the range. If it is not provided, the end date will automatically move duration days ahead of the start date when the start date is changed.
  • duration - This is the number of days ahead of the start date the end date will move to when the start date is changed, if an end date is not passed in. Defaults to 10.
  • onChange - Event handler for when the start or end of the range is changed. It will be passed two date instances, or if the start date is changed without an end date having been provided, the start date and undefined.

### More options

  • You can pass all accepted options except for onChange to the child DateTimeGroup elements.

Developing

Clone the repo and npm install.

npm start will create and watchify an example which you can open in your browser, at doc/example.html

npm test for the unit tests.

npm run lint checks the code against our guidelines

npm run coverage gets coverage with istanbul, outputing to the coverage directory, and exiting nonzero if any metric is below 100%.

FAQs

Package last updated on 06 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc