@indigina/ui-kit 1.1.420 → 1.1.421

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9403,14 +9403,16 @@ const getExportedExcelRows = (columns, data, gridColumns, translationMap) => {
9403
9403
  case 'time':
9404
9404
  return { format: column.excelFormat, value: timeStringToExcelFraction(value) };
9405
9405
  case 'date':
9406
- case 'dateLocal': {
9407
- const format = column.excelFormat || KIT_DATE_FORMAT;
9408
- return { format, value: value ? new Date(value) : undefined };
9406
+ case 'dateTime': {
9407
+ const format = column.excelFormat || (column.type === 'date' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
9408
+ const dateValue = value ? convertToUtcDate(value) : undefined;
9409
+ return { format, value: dateValue };
9409
9410
  }
9410
- case 'dateTime':
9411
+ case 'dateLocal':
9411
9412
  case 'dateTimeLocal': {
9412
- const format = column.excelFormat || KIT_DATETIME_FORMAT_LONG;
9413
- return { format, value: value ? new Date(value) : undefined };
9413
+ const format = column.excelFormat || (column.type === 'dateLocal' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
9414
+ const dateValue = value ? new Date(value) : undefined;
9415
+ return { format, value: dateValue };
9414
9416
  }
9415
9417
  }
9416
9418
  return { value: gridCellService.createCellValue(column.type, column.field, row, translationMap) };
@@ -9429,6 +9431,11 @@ const timeStringToExcelFraction = (time) => {
9429
9431
  const minutes = Number.parseInt(minutesStr, 10);
9430
9432
  return (hours * 60 + minutes) / (24 * 60);
9431
9433
  };
9434
+ const convertToUtcDate = (dateString) => {
9435
+ const date = new Date(dateString);
9436
+ const timezoneOffset = date.getTimezoneOffset();
9437
+ return new Date(date.getTime() + timezoneOffset * 60 * 1000);
9438
+ };
9432
9439
 
9433
9440
  var GridExportOptions;
9434
9441
  (function (GridExportOptions) {