Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
agregar días hasta la fecha usando vuejs

en la función de datos, he creado la variable mañana con la fecha de hoy, luego la configuré agregando 1 día, pero recibo este error

 data(){ return{ tomorrow: new Date(), tomorrow.setDate(tomorrow.getDate() + 1), }; },

error Error de análisis: Token inesperado.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La propiedad de datos está diseñada para almacenar variables, no para invocar funciones ni para agregar lógica como está tratando de hacer.

Pruebe la propiedad calculada:

 computed: { tomorrow() { const d = new Date() d.setDate(d.getDate() + 1) return d } }

Y luego en su plantilla puede hacer {{ tomorrow }} o en su componente vue this.tomorrow

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!