React Hook Form: SetValue does not work properly after reseting the form using reset() function

Viewed 432

There are 2 date fields(transactionDate and documentDate) on change of transaction date other one should be updated automatically. Which i am able to do using setValue function from useForm.

I have a used case where on change of a dropdown i have to reset the from which i am able to do by using reset function. But after the form is reset, onChange of transactionDate i update the value for documentDate using setValue and this doesn't work.

here is the sample code.

This issue I am facing in react hook form v7.10.1

0 Answers
Related