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

129
Views
Creating a list in JavaScript from django variable is autoparsing strings as dates

I'm working in a django project and I'm sending a dataframe with "to_dict" to the template. The dataframe consist of dates and extra info that I deleted for ease of understanding.

Im using that data in javascript, but I need the date as a string as the lib I'm using doesn't support date objects for some reason.

The problem comes that when I make a list out of the parameter the dates get parsed automatically without me doing anything extra.

So for this lines of code:

listData = {{data|safe}};
console.log({{data|safe}});
console.log(listData);

I get this result:

problem screenshot

So what i need is that creating a list doesn't parse the string to date and if possible the reason why is this happening.

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!