Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

439
Views
Material Ui MobileDatePicker renderInput got an typescript error

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!