question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when using Formatter.DATETIME as a column format in Tabulator

See original GitHub issue

This is the error I am getting when trying to set format = Formatter.DATETIME in a ColumnDefinition:

Uncaught (in promise) ReferenceError: moment is not defined
    at C.datetime (tabulator.min.js:11)
    at C.formatValue (tabulator.min.js:11)
    at l._generateContents (tabulator.min.js:8)
    at l.setValueActual (tabulator.min.js:8)
    at l.build (tabulator.min.js:8)
    at new l (tabulator.min.js:8)
    at t.i.generateCell (tabulator.min.js:6)
    at eval (tabulator.min.js:6)
    at Array.forEach (<anonymous>)
    at t.generateCells (tabulator.min.js:6)

My Class has a date field of type pl.treksoft.kvision.types.Date as I am using Ktor for my backend

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
rjaroscommented, May 5, 2019

Have you tried configuring webpack.ProvidePlugin? Here is the configuration for jQuery https://github.com/rjaros/kvision-examples/blob/master/template/webpack.config.d/jquery.js

1reaction
rjaroscommented, May 1, 2019

Tabulator data/time functions (formatters, editors, validators etc) require moment.js library. I didn’t add it as a dependency in tabulator module, because it is quite large library and it makes the output js code size a lot bigger. So at the moment, if you need to use data/time functions, you can add this library directly into the main index.html page. In fact the showcase example includes this library.

Of course I forgot to mention about it in the guide 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatting | Tabulator
Tabulator allows you to format your data in a wide variety of ways, so your tables can display information in a more graphical...
Read more >
Tabulator Cell datetime object - Need to Format - Stack Overflow
Here is a snippet I have attempted. The table shows up with "blank rows." If I remove the formatting, the data shows correctly...
Read more >
Use column formatting to customize SharePoint | Microsoft Learn
To apply formatting based on the value in a date/time field, apply the following patterns. Formatting an item when a date column is...
Read more >
Easy Data Table Generator with JSON - Tabulator - jQuery Script
High performant large table based on virtual DOM; Column sorting; Custom data formatting; Resizable columns; Auto scaling to fit data/element ...
Read more >
Tabulator does not show formatting when used in Column
I am using styling for displaying a dataframe using Tabulator. The example is from here Styling shows when I use styled.show() to display ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found