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

123
Views
Changing mui controls to/from edit and view mode when clicked and lost focused

By default MUI date time picker gets rendered like this:

  <LocalizationProvider dateAdapter={AdapterDateFns}>
    <DatePicker
      views={["month", "year"]}
      renderInput={(params) => <TextField {...params} />}
      label="Month & year"
      onChange={() => {}}
    />
  </LocalizationProvider>

enter image description here

I want it to look like normal label when it loses focus (say to emulate "View mode"):

enter image description here

And when one clicks on it, it should look like what is shown in first image (say to emulate "edit mode").

How we can achieve this?

PS1: here is the link to codesandbox

PS2: can someone let me know where we can find mui lab on unpkg? I was not able to find it here. Wanted to embed the whole code here itself as in this answer.

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!