(core) Converting big number (9 digits or more) to date directly

Summary:
Interpret huge numbers (>8 digits) as timestamps when converting numeric column to date.
Convert date/date time columns to timestamp when converted from numeric/int column.

Test Plan: Updated

Reviewers: georgegevoian

Reviewed By: georgegevoian

Subscribers: dsagal, alexmojaki

Differential Revision: https://phab.getgrist.com/D4030
This commit is contained in:
Jarosław Sadziński
2023-10-05 08:48:14 +02:00
parent 498ad07d38
commit ad299f338a
5 changed files with 77 additions and 7 deletions

View File

@@ -1191,7 +1191,7 @@ export async function renameTable(tableId: string, newName: string) {
/**
* Rename the given column.
*/
export async function renameColumn(col: IColHeader, newName: string) {
export async function renameColumn(col: IColHeader|string, newName: string) {
const header = await getColumnHeader(col);
await header.click();
await header.click(); // Second click opens the label for editing.