marcelle
marcelle copied to clipboard
Trailing integer in text data interpreted as Date in DatasetTable
Describe the bug
I was trying to display some data with datasetTable and found that some of the texts were interpreted as Date.
For example, 1 is interpreted as a Date and reformat to about 22 years ago
To Reproduce Steps to reproduce the behavior:
- Follow examples to initialize dataset and datasetTable variables
- Have some entries with integers or entries ending with an integer, ie. 1, sample 1, etc.
- use
dataset.create()to append the data as in object format, ie.{entry: '1'} - add the table on dashboards with
use() - See
1->about 22 years ago
A simpler way to reproduce the behavior:
- open Iris-SKlearn example
- change
VirginicatoVirginica 1orSetosa' toSetosa 1` - load the data in the demo
- see
Virginica 1becomeabout 22 years ago
Expected behavior It should display the original data as in the storage.
Actual behavior Integers in texts interpreted as Date Format Error in Console Does not match to data in Storage
Additional Information log in the console:
Date Parsing Error text data sample1 RangeError: Invalid time value
at formatDistance3 (index.js:110:11)
at formatDistanceToNow (index.js:92:10)
at Array.formatDate (TableContentCell.svelte:18:16)
at Object.p (TableContentCell.svelte:45:14)
at Object.p (TableContentCell.svelte:57:5)
at update (index.mjs:1191:36)
at flush (index.mjs:1158:13)
Screenshots table appearances - actual data in localstorage after changing Setosa to Setosa 1 in Iris csv