TonyGermaneri / canvas-datagrid

Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.
BSD 3-Clause "New" or "Revised" License
1.42k stars 184 forks source link

grid.formatters.date error #576

Open thdoan opened 4 months ago

thdoan commented 4 months ago

Expected behavior and actual behavior.

Expected to have no errors, but got errors.

Steps to reproduce the problem.

  1. Go to https://canvas-datagrid.js.org/examples/format-data/
  2. Double-click on any date cell
  3. Press Enter

ISSUE: This error is returned:

index.ts: Invalid time value (20:32)

  17 | });
  18 | 
  19 | grid.formatters.date = function (e) {
> 20 |   return new Date(e.cell.value).toISOString();
                                       ^
  21 | };
  22 | 
  23 | app.append(gridElement);

Specifications like the version of the project, operating system, or hardware.

Windows 10, Chrome 123.