Looks like Kinetic grid Copy action pattern matches all values to decide whether it’s a date:
copyAllRows(t) {
var o;
let c;
return this.validateSelectedKeysWithSelector(),
c = (null !== (o = this.view) && void 0 !== o ? o : this.getParsedBinding()) ? this.executeProcess(this._dataFilter.execute(this.getBindingDataView().data), {
filter: this.settings.currentState.filter,
sort: this.settings.currentState.sort
}) : this.data ? this.data : this.nativeControl.data.data || [],
c.forEach( (E, S) => {
const B = this.getSelectorAddedOnCopy(t = 0 === S ? t : t + "\n", S, E);
t = B.text,
this.model.columns.filter(G => !G.hidden).forEach( (G, ie) => {
let ge = null !== E[G.field] ? E[G.field] : "";
ge = this.processCurrFieldValue(ge, G, E), // << PROCESS VALUES
t = 0 !== ie || B.isAdded ? t + "\t" + ge : t + ge
}
)
}
),
t
}
...
processCurrFieldValue(t, o, c) {
const [h,E] = this.customFormatting(t, o, c);
if (h)
return E;
const S = Hr.isDateString(t) ? new Date(t) : t; // << PATTERN MATCH n CAST
return t = Hr.isDate(S) ? this.epInternationalizationService.formatDate(S, "d") : t,
Hr.isString(t) && (t = t.replace(/\r\n/g, " ").replace(/\r/g, " ").replace(/\n/g, " ")),
Hr.isNumber(t) && !(null != o && o.isLink) && (t = this.epInternationalizationService.formatNumberToCurrentLocale(t)),
t
}
static isDate(t) {
return t instanceof Date && !isNaN(t.valueOf())
}
static isISODate(t) {
return l.isoDateRegEx || (l.isoDateRegEx = new RegExp(/^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?(\.[0-9]+)?(([+-][0-9]{2}:[0-9]{2})|Z)?$/i)),
l.isoDateRegEx.test(t)
}
static isISODateString(t) {
return l.isoDateRegEx || (l.isoDateRegEx = new RegExp(/^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?(\.[0-9]+)?(([+-][0-9]{2}:[0-9]{2})|Z)?$/i)),
l.isString(t) && l.isoDateRegEx.test(t)
}
static isDateString(t) {
return l.dateRegEx || (l.dateRegEx = new RegExp(/^(3[01]|[12][0-9]|0[1-9]|[1-9])[-|/](3[01]|[12][0-9]|0[1-9]|[1-9])[-|/][0-9]{4}$/)),
l.isString(t) && (l.isISODate(t) || l.dateRegEx.test(t))
}
so basically anything that resembles a date string gets cast to date.
examples:
2023-04-15
2023-04-15T12:34:56
2023-04-15T12:34:56.789Z
2023-04-15T12:34:56+02:00
9-1-2024
09-01-2024
31/12/2024
1/1/2024
no idea why you’re getting minus-one-day, that’s further concerning. Probably the internationalization (you in EU?)