File tree 1 file changed +9
-0
lines changed
packages/x-date-pickers/src/PickersTextField
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,14 @@ const PickersTextField = React.forwardRef(function PickersTextField(
148
148
149
149
const PickersInputComponent = VARIANT_COMPONENT [ variant ] ;
150
150
151
+ const inputAdditionalProps = { } as any ;
152
+ if ( variant === 'outlined' ) {
153
+ if ( InputLabelProps && typeof InputLabelProps . shrink !== 'undefined' ) {
154
+ inputAdditionalProps . notched = InputLabelProps . shrink ;
155
+ }
156
+ inputAdditionalProps . label = label ;
157
+ }
158
+
151
159
return (
152
160
< PickerTextFieldOwnerStateContext . Provider value = { ownerState } >
153
161
< PickersTextFieldRoot
@@ -196,6 +204,7 @@ const PickersTextField = React.forwardRef(function PickersTextField(
196
204
aria-describedby = { helperTextId }
197
205
aria-live = { helperTextId ? 'polite' : undefined }
198
206
data-active-range-position = { dataActiveRangePosition }
207
+ { ...inputAdditionalProps }
199
208
{ ...InputProps }
200
209
/>
201
210
{ helperText && (
You can’t perform that action at this time.
0 commit comments