Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

124
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda