@cdmx/wappler_ag_grid 0.6.8 → 0.7.0
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.
- package/dmx-ag-grid.js +11 -18
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -362,25 +362,18 @@ dmx.Component('ag-grid', {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
function formatTime(params, timezone) {
|
|
365
|
-
const date = new Date(params.value)
|
|
366
|
-
if (
|
|
367
|
-
|
|
365
|
+
const date = new Date(params.value)
|
|
366
|
+
if (timezone) {
|
|
367
|
+
const options = {
|
|
368
|
+
timeZone: timezone,
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
const convertedTimestamp = date.toLocaleString('en-US', options);
|
|
372
|
+
dateTimezone = new Date(convertedTimestamp).getTime();
|
|
373
|
+
return formatDate(dateTimezone)
|
|
374
|
+
} else {
|
|
375
|
+
return formatDate(date);
|
|
368
376
|
}
|
|
369
|
-
const options = {
|
|
370
|
-
timeZone: timezone,
|
|
371
|
-
year: 'numeric',
|
|
372
|
-
month: '2-digit',
|
|
373
|
-
day: '2-digit',
|
|
374
|
-
hour: 'numeric',
|
|
375
|
-
minute: 'numeric',
|
|
376
|
-
second: 'numeric',
|
|
377
|
-
hour12: false,
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
const formatter = new Intl.DateTimeFormat(undefined, options);
|
|
381
|
-
const formattedDateTime = formatter.format(date);
|
|
382
|
-
return formatDate(formattedDateTime)
|
|
383
|
-
|
|
384
377
|
}
|
|
385
378
|
dateFilterParams = {
|
|
386
379
|
comparator: function (filterLocalDateAtMidnight, cellValue) {
|