Add uncontrolled component support to SingleInputDateField so it works with web components. Web components are uncontrolled by definition, and I discovered that our SingleInputDateField (P)react component didn't actually support an uncontrolled component behavior. Even though the underlying TextField component supports the uncontrolled behavior, we need access to that internal value in the SingleInputDateField, so I re-implemented the uncontrolled-component internal state tracking at the SingleInputDateField level. We have several other components that follow a very similar pattern of optionally tracking internal state based on whether the value is provided.
How to test
Try out the new Uncontrolled story on the SingleInputDateField and specifically use the calendar picker to select a date. Calendar selection should also now work on the web component. Note that some changes were made to the web component to support it, and those changes will need to be merged with @tamara-corbalt's changes.
Summary
Add uncontrolled component support to
SingleInputDateField
so it works with web components. Web components are uncontrolled by definition, and I discovered that ourSingleInputDateField
(P)react component didn't actually support an uncontrolled component behavior. Even though the underlyingTextField
component supports the uncontrolled behavior, we need access to that internal value in theSingleInputDateField
, so I re-implemented the uncontrolled-component internal state tracking at theSingleInputDateField
level. We have several other components that follow a very similar pattern of optionally tracking internal state based on whether thevalue
is provided.How to test
Try out the new
Uncontrolled
story on theSingleInputDateField
and specifically use the calendar picker to select a date. Calendar selection should also now work on the web component. Note that some changes were made to the web component to support it, and those changes will need to be merged with @tamara-corbalt's changes.