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

120
Vistas
Datejs lib not working after Upgrade to J-Query 3.x

I have a node.js project where we are using the following lib.

https://github.com/datejs/Datejs

After a recent update of our local J-Query file from 1.9.1 to 3.6.0 this lib stopped working.

Sample Code

    var today = Date.today();

Errors

TypeError: Date.today is not a function at Object. (main.js:8:126614)

Cannot read properties of undefined (reading 'includes')

TypeError: i.add is not a function

When I change the code to

var today = new Date();
var numberOfDays = today.add(5).days();

Then there is a problem with the add method, see the error listed above.

Question, is there anyway to make this lib work with the latest J-Query? The repo appears old and stale, no new releases since 2007, is there any other similar libs that I could try?

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

0

Sorry, I think I finally found the answer.

var parsedate = require('datejs');

Basically, this line was previously removed to help clean-up un-used variables, the previous Jquery upgrade caused issues with the loading order of some of our js files. Although parsedate is never used, this line is still needed to include the datejs lib.

#Winning #TigerBlood

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