Skip to content

Commit 1d9baac

Browse files
fix(datagrid-web): send displayValue when no format is provided
1 parent ab5a832 commit 1d9baac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/pluggableWidgets/datagrid-web/src/features/data-export/DSExportRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ const readers: ReadersByType = {
283283

284284
if (value instanceof Date) {
285285
return {
286-
t: "d",
287-
v: value,
286+
t: format === undefined ? "s" : "d",
287+
v: format === undefined ? data.displayValue : value,
288288
z: format
289289
};
290290
}
@@ -358,7 +358,7 @@ interface DataExportProps {
358358
function getCellFormat({ exportType, exportDateFormat, exportNumberFormat }: DataExportProps): string | undefined {
359359
switch (exportType) {
360360
case "date":
361-
return exportDateFormat?.status === "available" ? exportDateFormat.value : "mm/dd/yyyy";
361+
return exportDateFormat?.status === "available" ? exportDateFormat.value : undefined;
362362
case "number":
363363
return exportNumberFormat?.status === "available" ? exportNumberFormat.value : undefined;
364364
default:

0 commit comments

Comments
 (0)