项目作者: afeiship

项目描述 :
React ant range picker.
高级语言: JavaScript
项目地址: git://github.com/afeiship/react-ant-range-picker.git
创建时间: 2018-02-11T09:46:00Z
项目社区:https://github.com/afeiship/react-ant-range-picker

开源协议:MIT License

下载


react-ant-range-picker

React ant range picker.

properties:

  1. static propTypes = {
  2. className: PropTypes.string,
  3. format: PropTypes.string,
  4. onChange: PropTypes.func,
  5. };
  6. static defaultProps = {
  7. format: 'YYYY-MM-DD',
  8. onChange: noop,
  9. };

usage:

  1. // install: npm install afeiship/react-ant-range-picker --save
  2. // import : import ReactAntRangePicker from 'react-ant-range-picker'
  3. class App extends React.Component{
  4. state = {
  5. };
  6. constructor(props){
  7. super(props);
  8. window.demo = this;
  9. window.refs = this.refs;
  10. window.rc = this.refs.rc;
  11. }
  12. _onChange = e => {
  13. console.log(e);
  14. };
  15. render(){
  16. return (
  17. <div className="hello-react-ant-range-picker">
  18. <ReactAntRangePicker onChange={this._onChange} ref='rc' ></ReactAntRangePicker>
  19. </div>
  20. );
  21. }
  22. }

customize style:

  1. // customize your exception styles:
  2. $react-ant-range-picker-options:(
  3. );
  4. @import '~node_modules/react-ant-range-picker/style.scss';