Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

139
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda