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

77
Vistas
why calendarDate returns invalid date

I have this code, in the `new Date(this.dataFormat + 'T23:59'); I added T23:59 to get the time zone regardless of the person's time zone, but it returns invalid date

`

  const calendarDate = new Date(this.dataFormat + 'T23:59');
  const today = new Date();
  console.log(calendarDate)   //Invalid Date
  console.log(this.dataFormat) //Fri Jun 03 2022 20:59:59 GMT-0300 (Brasilia Standard Time)
  if (calendarDate < today) {
    this.errors.push('Data selecionada precisa ser maior que a atual.');
  }

Could someone help me with how to work this part of the code?

maybe removing the 'T23:59' could be a solution, but with the different time zone it would fall into the error

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