I use "MobileDatePicker" from Material Ui. Here in renderInput props I used a div, instead of ,
<MobileDatePicker
label="For mobile"
value={value}
onChange={(newValue) => {
setValue(newValue);
}}
renderInput={(params) => <div ref={params.inputRef} {...params.inputProps}>
<svg>
{...svg element}
</svg>
</div>
}
/>
But here i got an error from typescript.
Error comming from <div>, inside renderInput.
Type '{ children: never[]; defaultChecked?: boolean | undefined; defaultValue?: string | number | readonly string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; ... 249 more ...; ref: Ref<...> | undefined; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Type '{ children: never[]; defaultChecked?: boolean | undefined; defaultValue?: string | number | readonly string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; ... 249 more ...; ref: Ref<...> | undefined; }' is not assignable to type 'HTMLAttributes<HTMLDivElement>'.
Types of property 'onCopy' are incompatible.
Type 'ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined' is not assignable to type 'ClipboardEventHandler<HTMLDivElement> | undefined'.
Type 'ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement>' is not assignable to type 'ClipboardEventHandler<HTMLDivElement>'.
Type 'HTMLInputElement | HTMLTextAreaElement' is not assignable to type 'HTMLDivElement'.
Property 'align' is missing in type 'HTMLTextAreaElement' but required in type 'HTMLDivElement'.ts(2322)
lib.dom.d.ts(6192, 5): 'align' is declared here.
Can anybody help me?? Thank you.