wangzuo / input-moment

React datetime picker powered by momentjs
https://wangzuo.github.io/input-moment
ISC License
527 stars 173 forks source link

Cannot read property 'preventDefault' of undefined. in input-moment.js #70

Closed gentgaashi closed 7 years ago

gentgaashi commented 7 years ago

You are not providing the event argument when calling "handleClickTab" method so it will throw the error i mentioned in the title, just change: onClick={() => this.handleClickTab(0)} to onClick={(event) => this.handleClickTab(0, event)}

and

onClick={() => this.handleClickTab(1)} to onClick={(event) => this.handleClickTab(1, event)}

and it should be good :)

wangzuo commented 7 years ago

Thanks, fix available in 0.3.4