You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my example, I'm using the <TimePicker /> component and I need to access its input in an uncontrolled way. The <TimePicker /> component is within a standard <form /> component utilizing a ref={formRef}. I should be able to do the following:
ReactUSWDS Version & USWDS Version:
Describe the bug
In my example, I'm using the
<TimePicker />
component and I need to access its input in an uncontrolled way. The<TimePicker />
component is within a standard<form />
component utilizing aref={formRef}
. I should be able to do the following:But the output is
00:00
.However if I
console.log
the following:formRef.current.elements["end-time"][1].value
it works just fine as it's outputting the value of the
<input/>
component and not the<select />
.Here's a screenshot of the DOM:
To Reproduce
Steps to reproduce the behavior:
<TimePicker name="test-component" />
within a<form ref={formRef} />
component.console.log
the value of:As the input changes.
Expected behavior
Be able to access
FormData
properly.Device and Browser Information (please complete the following information if describing a UI bug):
Mac, Chrome Version 122.0.6261.94 (Official Build) (arm64)
The text was updated successfully, but these errors were encountered: