I want to prevent the displayed value to change when an unexpected error happen (e.g. failed network request). Currently even if an error occured and this.state.date isn't changed, the visible input box's value is still updated to the picked date.
Your Environment
Version used: npm version says 5.0.1
Browser Name and version: Chrome 57.0.2987.133 (64-bit)
Operating System and version (desktop or mobile): Ubuntu Desktop 16.04
Expected Behavior
Suppose
onChange
doesn't change the variable that is passed as thevalue
property of DatePicker, e.g.When a new date is picked, the displayed value in the visible input box shouldn't change.
Current Behavior
The displayed value is changed to the picked date.
Context
Suppose
onChange
indeed change the variable that is passed asvalue
I want to prevent the displayed value to change when an unexpected error happen (e.g. failed network request). Currently even if an error occured and
this.state.date
isn't changed, the visible input box's value is still updated to the picked date.Your Environment