Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

119
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda