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

130
Views
¿Cómo reiniciar el selector de fechas de Tailwind cuando se agrega dinámicamente?

Estoy usando el selector de fechas de Tailwind y agrego nuevos elementos haciendo clic en un botón:

 <html> <head> <!-- ... --> <script src="https://unpkg.com/flowbite@1.5.1/dist/datepicker.js"></script> </head> <body> <!-- ... --> <input datepicker type="text" placeholder="Select date"> <button>Add</button> <!-- ... --> <script> document.querySelector('button').addEventListener('click', function() { var input = document.createElement('input'); input.setAttribute('datepicker', ''); document.body.appendChild(input); document.querySelectorAll('[datepicker]').forEach(function(datepickerEl) { new Datepicker(datepickerEl, getDatepickerOptions(datepickerEl)); // ❌ Unhandled Promise Rejection: ReferenceError: Can't find variable: Datepicker }); }); </script> </body> </html>

Una vez que se ha agregado un nuevo elemento, no tiene el selector de fecha. ¿Cómo puedo reiniciar el selector de fecha para todos los elementos nuevos?

about 4 years ago · Santiago Trujillo
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!