Cannot override onReset method of DateInput component
Cannot override onReset method of DateInput component

Toolkit version : 2.0.0
Expected
The onReset method of DateInput should be either available to override, or should return the current day value and not display "jj/mm/aaaa".
Actual
It is impossible to override this method, and when you click on the reset button, no value is returned to the parent component, hence it is impossible to know when the user clicked on this button.
Hello,
I see that the pull request https://github.com/AxaFrance/react-toolkit/pull/1032 provides a solution by making the component call the onChange method and return null when the reset button is clicked on.
I wonder if it would not be better to declare an onReset function prop that the developer could override. Currently, clicking on the reset button makes the viewValue become "jj/mm/aaaa" which is not always the result the developer wants.
To provide some context, I use this component in a bigger form that has a "reset" button to reinit all form components. Due to the current behaviour of this component, our reset button does not work anymore, and clicking on the reset button of the component makes "jj/mm/aaaa" appear, but we would like to display the current date instead.
Maybe it would be better to allow the developer to provide an onReset prop and to control the viewValue directly ?
We implemented this way in order to be compliant with the previous version. But your solution was one of the solutions we had in mind.
What do you think @arnaudforaison @johnmeunier ?
@arnaudforaison @johnmeunier que pensez-vous du message de @lilian-delouvy ?
We need to discuss this further to see which solution we would implement.
I managed to do it by settings the onInput event :
onInput={e => { if (!e.target.value) { // you can implement your logic here } }}