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

214
Views
How to create a start date and end date array in JavaScript?

I am trying to create a timeline chart using Apex.js library. Even after passing dates in the required format, it throws an error:

Uncaught (in promise)

Error: Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts

Here's what my dateArr looks like.

let dateArr = [];

let startDate = ["01-12-2021", "10-10-2021", "01-12-2021", "20-09-2021", "20-09-2021", "27-09-2021"];
let endDate = ["31-12-2021", "30-11-2021", "31-12-2021", "31-12-2021", "24-09-2021", "15-10-2021"]
let categories = ["Community Release / Review", "Development", "Documentation", "Gathering Visualizations", "Overview", "Training"]

for (let i = 0; i < categories.length; i++) {
  dateArr.push([startDate[i], endDate[i]]);
}

console.log(dateArr)

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!