CoreUI React Pro CDatePicker - unwanted onDateChange call
rtsoftplzen opened this issue · 1 comments
Hi,
the CDatePicker component has been observed to call the onChange event when a value is changed externally. When a new date arrives in the date property CDatePicker calls the onDateChange event. Is this the right behavior? If the date passed externally changes outside the component, I don't need the CDatePicker component to change the state again.
The behaviour can be seen in the attached Codepen link. Just click on the change date button on the outside of the component and observe the console.log. Without validation, setDate is called twice with the same value.
As an additional question, I would like to know how to reset the CDatePicker value. We need a CDatePickear without a value. Passing an empty string led to an error.
Operating system: potentially all (tested on macOS)
Browser: potentially all (tested on Chrome and Firefox)
CodePen: https://codepen.io/rtsoftplzen/pen/Rwdqqxq
Thank you in advance.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions