react-date-range-picker
v0.5.2
Published
React DateRange Picker
Downloads
83
Maintainers
Readme
react-date-range-picker
DateRange Picker as React Component
Installation
npm install -S react-date-range-picker
Example
import React from 'react';
import Datepicker from 'react-date-range-picker';
class Demo extends React.Component {
constructor (props) {
super(props);
this.state = {
date: new Date().toLocaleString()
};
}
onClick (date) {
this.setState({date: date.toLocaleString()});
}
render () {
return (
<div className="demo">
<input
type="text"
name="date"
className="demo__input"
value={this.state.date}
readOnly />
<Datepicker onClick={::this.onClick} />
</div>
);
}
}
Demo is here
https://isnifer.github.io/react-date-range-picker/