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

222
Vistas
Problem: Date input onchange running function on number keys input

I have 2 date fields; end_date and to_date. When end_date is set to before to_date it changes to_date to the value of end_date. The problem I'm having is if the user types in the date field rather than using the calendar picker, it accepts each of the keypresses as a valid date.

For example: Both end_date and to_date = 18/10/2022

The user wants to change end_date to a later date (ex 20/11/2022), so in theory it should not change to_date. When the user then goes to type 20 the date field will run the function with the date 02/10/2022, thus changing to_date (because typing "2" will change the date to 02).

The only solution I have right now is just making it impossible for the user to use number keys in the field, however this is not optimal. Does anyone have a better solution?

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