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

133
Views
React Tabulator failing to return valid date from ISO 8601 timestamp

I'm using React running Tabulator 0.18.1. I have a timestamp formatted in ISO 8601 (ex. 2022-05-08T03:24:19.991+00:00) that I'd like to be converted into mm/dd/yyyy.

This is what I'm doing to set up the column data and formatter:

 var columns = [
        {
            title: "Last Seen", field: "attributes.lastSeen", width: 200, formatter: "datetime", formatterParams: {
                inputFormat: "iso",
                outputFormat: "mm/dd/yyyy",
                invalidPlaceholder: "(invalid date)",
                timezone: "America/Los_Angeles",
            }
        }
    ]

My problem is that Tabulator prints (invalid date) in the table, instead of the converted date. I have luxon 2.3.2 installed, and am getting no errors regarding that, just the invalid date. I'm actually not getting any errors in the console at all, so I'm having trouble diagnosing this. I've tried looking for other possible inputFormats that might work, but I've yet to find anything.

Any recommendations on how to get this ISO time converted to mm/dd/yyyy? Hopefully I covered everything, but if any additional detail is need, just ask. Thank you all very much!

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

0

I'm assuming that the type of lastSeen is ISO string in your input data.

Working Demo: https://codesandbox.io/s/valid-date-from-iso-f06hc2?file=/components/Home.js

I used a fake data for the above demo which you can find in data.js inside components folder.

Hope it helps!

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!