We are using react-date-picker (love it) in combination with react-redux-forms. In order to make it play right with validation we need to hook into the onClick (focus) and click outside the component (blur).
Passing onClick to the component does nothing - just gets ignored.
recreate:
<DatePicker onClick={() => console.log('hello')} />; // never fires.
Do you know a potential workaround for this?
Hmmm. That seems like an excellent idea! My main concern is how to handle this nicely taking into consideration that DatePicker renders DateInput and Calendar components, both potentially supporting a number of events. I could catch all the events that bubbled up to DatePicker, but is it an optimal solution?
We were concerned with the actual text input itself, not the DateInput or Calendar components.
so will you add events? this is crucial
Starting with v6.13.0, you are able to do this.
Most helpful comment
Starting with v6.13.0, you are able to do this.