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

75
Views
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
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!