Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda