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

155
Visualizações
Calendar repositioning in front of datepicker after expanding and collapsing a parent div

I have a datepicker element and a collapsible div within a parent div. Prior to expanding the collapsible div, the calendar displays below the datepicker and in front of the parent div, as desired. After expanding and collapsing the div with button clicks, the calendar displays on top of the datepicker, inside the div (see screenshot below). It appears the vertical scrollbar is not being removed, when it is no longer required, and causing the calendar to be repositioned. Is there a way to get my calendar to display below the datepicker and still keep the collapse feature? See code snippet and link to code sandbox.

CodeSandbox

Screenshot:

CODE SNIPPET

export default function App() {
  const [toggleCollapse, setToggleCollapse] = useState(false);
  useEffect(() => {}, [toggleCollapse]);
  return (
    <>
      <div className="wrapper">
        <pearson-datepicker></pearson-datepicker>
        <button onClick={() => setToggleCollapse(!toggleCollapse)}>
          toggleCollapse
        </button>
        {toggleCollapse ? (
          <div>
            Lorem Ipsum Text Here
          </div>
        ) : (
          <></>
        )}
        <div></div>
      </div>
    </>
  );
}
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