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

287
Vistas
Axios request returning 'invalid date' in React but API response in network calls returns date string

I am trying to fetch data from an api. Everything returns as it should when I look in the network call but when I run console.log(response), 'dateModified' shows as 'Invalid Date' even though the network call is fine. Does axios automatically try to convert the date string into a date object or is something else happening? I see no reason why it would be fine on the network call but not when I console.log or try to use the value

Ex: Axios call:

axios.get('/apihere').then((response) => {
  console.log(response)
}

returns:

Object {
    dateModified: Invalid Date
  }

which has an option to expand and show " Date.prototype {...}"

Network call:

Object {
    dateModified: "06/02/2022"
  }
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