Hi,
My form is going to have controlled DatePicker component. However, I could not figure out why when I defined the onChange function on the DatePicker, the form submission excluded its value.
https://codesandbox.io/p/sandbox/cool-hofstadter-2vj2s3?file=%2Fapp%2Fapp.jsx%3A18%2C7
From the code above, Test Date 1 and Test Date 2 components are almost the same, except, Test Date 2 component has line 63, which I set its 'value' and defined 'onChange' function separately. However, form submission will not recognize Test Date 2 value.
From pictures above, if removing 'value' and 'onChange' on line 63, you will see Result on the left, otherwise, you will receive result on the right