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

512
Vistas
How to make whole html input type date field clickable for calendar popup?

In the HTML input type date field when we click on an icon, the calendar is popup. But I want to make it pop up when we click in the dd/mm/yyyy field? I want to make calendar popup when clicked on this marked field

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Listen for the focus event on the element, then invoke the HTMLInputElement.showPicker() method:

document.getElementById("datePicker").addEventListener('focus', function(event) {
  event.target.showPicker();
});
<input type="date" id="datePicker" />

Note: Unfortunately this doesn't work in the snippet above due to the restrictions of calling showPicker() cross-origin combined with the cross-origin implications of the Stack Snippets feature itself, but should work in practice.

However, you should consider that this particular method has relatively abysmal support (only ~66% of all browsers implement it as of this writing).

about 4 years ago · Juan Pablo Isaza Denunciar
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